Compare overload request history when checking CPU-only load
This commit is contained in:
1 parent
c9ce8d3a74
commit
223bb145e6
1 file changed
+6
-1
@@ -516,11 +516,16 @@ static void test_global_pressure(void) {
|
||||
for (unsigned i = 1; i < 3; i++) for (unsigned sub = 0; sub < 2; sub++)
|
||||
CHECK(stream_receive_open(subscribers[i], nodes[3]->node_id, sub, UINT64_MAX, &receives[i][sub]) == STREAM_OK);
|
||||
for (unsigned i = 1; i < 3; i++) run_until(&global_data[i], 1);
|
||||
uint64_t previous_requests[3] = {0};
|
||||
for (unsigned i = 1; i < 3; i++) {
|
||||
struct stream_peer_load_info before; CHECK(stream_peer_get_load(nodes[3], nodes[i]->node_id, &before) == STREAM_OK);
|
||||
previous_requests[i] = before.request_id;
|
||||
}
|
||||
simulated_cpu = 1; test_clock_run_for(ua, 7000);
|
||||
struct stream_peer_load_info info[3];
|
||||
for (unsigned i = 1; i < 3; i++) {
|
||||
CHECK(stream_peer_get_load(nodes[3], nodes[i]->node_id, &info[i]) == STREAM_OK);
|
||||
CHECK(info[i].cpu_percent == 95 && !info[i].request_id && !info[i].load.queued.bytes);
|
||||
CHECK(info[i].cpu_percent == 95 && info[i].request_id == previous_requests[i] && !info[i].load.queued.bytes);
|
||||
}
|
||||
struct ll_queue *queues[3] = {0}; queue_callback_fn callbacks[3] = {0}; void *args[3] = {0};
|
||||
for (unsigned i = 1; i < 3; i++) {
|
||||
|
||||
Reference in new issue
Block a user