From 374df7a29407b706a5fb4fe6a6f1a7b84ec4a60e Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 13 May 2021 11:37:43 -0700 Subject: session: switch ct to vc and track half-opens Type: improvement Signed-off-by: Florin Coras Change-Id: I7f9c4b9b6e523ab549087ad21724f34f08fca793 --- src/plugins/unittest/session_test.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/plugins/unittest') diff --git a/src/plugins/unittest/session_test.c b/src/plugins/unittest/session_test.c index ad9c976f49e..b54712c3885 100644 --- a/src/plugins/unittest/session_test.c +++ b/src/plugins/unittest/session_test.c @@ -625,15 +625,12 @@ session_test_namespace (vlib_main_t * vm, unformat_input_t * input) SESSION_TEST ((error == 0), "client connect should not return error code"); /* wait for accept */ - if (vlib_num_workers ()) + tries = 0; + while (!placeholder_accept && ++tries < 100) { - tries = 0; - while (!placeholder_accept && ++tries < 100) - { - vlib_worker_thread_barrier_release (vm); - vlib_process_suspend (vm, 100e-3); - vlib_worker_thread_barrier_sync (vm); - } + vlib_worker_thread_barrier_release (vm); + vlib_process_suspend (vm, 100e-3); + vlib_worker_thread_barrier_sync (vm); } SESSION_TEST ((placeholder_segment_count == 1), -- cgit 1.2.3-korg