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:
Jacob Erlbeck 2014-09-19 16:40:21 +02:00 committed by Holger Hans Peter Freyther
parent 7c276fd561
commit c4fb4c2e38
1 changed files with 1 additions and 1 deletions

View File

@ -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);