mirror of https://gerrit.osmocom.org/libosmocore
bssgp_fc_test: do not use real time
Employ osmo_gettimeofday_override_* to take bssgp_fc_test off real time. The jenkins build slave often failed the test based on sporadic time delays due to server load and randomly rejected good patches. This patch ends that. Change-Id: Ie5029b85c2a154554d75d7f9af49a3b93425fdd9 Related: OS#1809
This commit is contained in:
parent
03ab9a6500
commit
7132011afa
|
@ -70,6 +70,12 @@ static void test_fc(uint32_t bucket_size_max, uint32_t bucket_leak_rate,
|
|||
struct bssgp_flow_control *fc = talloc_zero(NULL, struct bssgp_flow_control);
|
||||
int i;
|
||||
|
||||
osmo_gettimeofday_override_time = (struct timeval){
|
||||
.tv_sec = 1486385000,
|
||||
.tv_usec = 423423,
|
||||
};
|
||||
osmo_gettimeofday_override = true;
|
||||
|
||||
bssgp_fc_init(fc, bucket_size_max, bucket_leak_rate, max_queue_depth,
|
||||
fc_out_cb);
|
||||
|
||||
|
@ -83,7 +89,8 @@ static void test_fc(uint32_t bucket_size_max, uint32_t bucket_leak_rate,
|
|||
}
|
||||
|
||||
while (1) {
|
||||
usleep(100000);
|
||||
osmo_gettimeofday_override_add(0, 100000);
|
||||
|
||||
osmo_timers_check();
|
||||
osmo_timers_prepare();
|
||||
osmo_timers_update();
|
||||
|
|
Loading…
Reference in New Issue