diff options
| author | luwenpeng <[email protected]> | 2024-11-08 19:16:06 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-11-08 19:17:23 +0800 |
| commit | 8349a631e1a2542e3e7075b9c8f00e7d57337888 (patch) | |
| tree | 8d62f67fc3ea85fd2f7868b8353fab6fc869bffd /infra/session_manager/test/gtest_session_table.cpp | |
| parent | d0a868591470a4a9d71a65a5d540058e72c8d92c (diff) | |
rename: update session pool and packet pool API names for clarity
Diffstat (limited to 'infra/session_manager/test/gtest_session_table.cpp')
| -rw-r--r-- | infra/session_manager/test/gtest_session_table.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/infra/session_manager/test/gtest_session_table.cpp b/infra/session_manager/test/gtest_session_table.cpp index 4a45f38..491ca58 100644 --- a/infra/session_manager/test/gtest_session_table.cpp +++ b/infra/session_manager/test/gtest_session_table.cpp @@ -51,7 +51,7 @@ static void session_free_callback(struct session *sess, void *arg) if (sess) { struct session_pool *sess_pool = (struct session_pool *)arg; - session_pool_push(sess_pool, sess); + session_pool_release_sessoin(sess_pool, sess); sess = NULL; } } @@ -106,17 +106,17 @@ TEST(SESSION_TABLE, OP_SESSION) session_table_set_freecb(sess_table, session_free_callback, sess_pool); // Add - sess1 = session_pool_pop(sess_pool); + sess1 = session_pool_acquire_sessoin(sess_pool); EXPECT_TRUE(sess1 != NULL); session_set_id(sess1, 1); session_set_tuple6(sess1, &sess1_tup6); - sess2 = session_pool_pop(sess_pool); + sess2 = session_pool_acquire_sessoin(sess_pool); EXPECT_TRUE(sess2 != NULL); session_set_id(sess2, 2); session_set_tuple6(sess2, &sess2_tup6); - sess3 = session_pool_pop(sess_pool); + sess3 = session_pool_acquire_sessoin(sess_pool); EXPECT_TRUE(sess3 != NULL); session_set_id(sess3, 3); session_set_tuple6(sess3, &sess3_tup6); @@ -200,21 +200,21 @@ TEST(SESSION_TABLE, FIND_OLDEST_NEWEST) EXPECT_TRUE(session_table_find_lru(sess_table) == NULL); - sess1 = session_pool_pop(sess_pool); + sess1 = session_pool_acquire_sessoin(sess_pool); EXPECT_TRUE(sess1 != NULL); session_set_id(sess1, 1); session_set_tuple6(sess1, &sess1_tup6); session_table_add(sess_table, sess1); EXPECT_TRUE(session_table_find_lru(sess_table) == sess1); - sess2 = session_pool_pop(sess_pool); + sess2 = session_pool_acquire_sessoin(sess_pool); EXPECT_TRUE(sess2 != NULL); session_set_id(sess2, 2); session_set_tuple6(sess2, &sess2_tup6); session_table_add(sess_table, sess2); EXPECT_TRUE(session_table_find_lru(sess_table) == sess1); - sess3 = session_pool_pop(sess_pool); + sess3 = session_pool_acquire_sessoin(sess_pool); EXPECT_TRUE(sess3 != NULL); session_set_id(sess3, 3); session_set_tuple6(sess3, &sess3_tup6); |
