mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 13:03:33 +00:00
gbproxy/test: Fix time calculation in test_gbproxy_tlli_expire()
A single test case still uses time() to obtain the reference time. This commit fixes this by using the 'now' variable instead, that contains a fixed time value and does therefore not depend on when the test is executed. Sponsored-by: On-Waves ehf
This commit is contained in:
committed by
Holger Hans Peter Freyther
parent
c6807c4405
commit
51fde08b07
@@ -3780,7 +3780,7 @@ static void test_gbproxy_tlli_expire(void)
|
||||
register_tlli(peer, tlli2, imsi2, ARRAY_SIZE(imsi2), now);
|
||||
OSMO_ASSERT(peer->patch_state.logical_link_count == 2);
|
||||
|
||||
num_removed = gbproxy_remove_stale_link_infos(peer, time(NULL) + 2);
|
||||
num_removed = gbproxy_remove_stale_link_infos(peer, now + 2);
|
||||
OSMO_ASSERT(num_removed == 1);
|
||||
OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user