diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 21fdec7f7..6cc973292 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -77,6 +77,8 @@ module GGSN_Tests { * The tests expect to be able to send ping packets between any two simulated MS within the same * address range. This requires IP forwarding to be enabled on the corresponding tun interfaces. */ + integer mp_t3_response := 5; /* local T3-RESPONSE timeout, seconds */ + integer mp_n3_requests := 3; /* local N3-REQUESTS counter */ GGSN_Impl m_ggsn_impl := GGSN_IMPL_OSMOCOM; } @@ -296,13 +298,13 @@ module GGSN_Tests { } function f_shutdown_helper() runs on GT_CT { - /* Sleep N3_REQUESTS * T3_REQUEST seconds, nowadays 5*3=15s. + /* Sleep (T3-RESPONSE * N3-REQUESTS) seconds. * This ensures all retransmit queues are cleared before jumping * into next tests, hence avoding situation where a test resuses * a seqnum still in the GGSN's resp queue (dup req detector). * See OS#5485 avout decreasing time. We could also add a new * VTY command that calls gtp_clear_queues() */ - f_sleep(15.0); + f_sleep(int2float(mp_t3_response * mp_n3_requests)); setverdict(pass); } @@ -2090,16 +2092,15 @@ module GGSN_Tests { } - /* Send a duplicate echo req. osmo-ggsn maintains a queue for sent - responses (60 seconds): If same delete req is sent and duplicate is - detected, saved duplicate response should be sent back. */ + /* Send a duplicate echo req. osmo-ggsn maintains a queue for sent responses (T3-RESPONSE * N3-REQUESTS): + * If same delete req is sent and duplicate is detected, saved duplicate response should be sent back. */ testcase TC_act_deact_retrans_duplicate() runs on GT_CT { f_init(); var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), "1234", c_ApnInternet, valueof(t_EuaIPv4Dyn))); f_pdp_ctx_act(ctx); f_pdp_ctx_del(ctx, '1'B); /* leave some time in between to make sure retransmit response queue keeps packets for a while */ - f_sleep(1.0); + f_sleep(int2float(mp_t3_response)); /* g_c_seq_nr was increased during f_pdp_ctx_del(), we want a duplicate. If it was not a duplicate, osmo-ggsn would answer with a failure since that PDP ctx was already deleted. */