| 687 | } |
| 688 | |
| 689 | static bool th_wait_httpd_activity(cbm_httpd_t *listener, cbm_httpd_activity_t expected, |
| 690 | uint32_t timeout_ms) { |
| 691 | uint64_t deadline = cbm_now_ms() + timeout_ms; |
| 692 | while (cbm_now_ms() < deadline) { |
| 693 | if (cbm_httpd_activity_for_test(listener) == expected) |
| 694 | return true; |
| 695 | cbm_usleep(1000); |
| 696 | } |
| 697 | return cbm_httpd_activity_for_test(listener) == expected; |
| 698 | } |
| 699 | |
| 700 | typedef struct { |
| 701 | atomic_int begin_calls; |
no test coverage detected