aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/session_test.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-13 11:37:43 -0700
committerDamjan Marion <dmarion@me.com>2021-05-14 08:44:47 +0000
commit374df7a29407b706a5fb4fe6a6f1a7b84ec4a60e (patch)
tree152886657ecb36c90c117338a66684b76be3aab2 /src/plugins/unittest/session_test.c
parentbab6c52f4544ebe352a1a9f832137d9b4069ae6c (diff)
session: switch ct to vc and track half-opens
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7f9c4b9b6e523ab549087ad21724f34f08fca793
Diffstat (limited to 'src/plugins/unittest/session_test.c')
-rw-r--r--src/plugins/unittest/session_test.c13
1 files changed, 5 insertions, 8 deletions
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),