ci: fix flaky test

This commit is contained in:
Karl Seguin committed 2026-09-28 10:34:59 +08:00
1 parent a9738c7df5
commit 72d612472d
1 file changed
+5 -2
+5 -2
View File
@@ -633,11 +633,14 @@ test "Runner: waits out a throttled navigation" {
network.rate_limiter.?.deinit();
network.rate_limiter = null;
}
const start = lp.datetime.milliTimestamp(.boot);
_ = try network.rate_limiter.?.reserve("127.0.0.1", start);
const page = try session.createPage();
defer page.close();
// Reserved after createPage: on a slow runner, creating the page can eat
// the whole interval and the navigation then goes out undelayed.
const start = lp.datetime.milliTimestamp(.boot);
_ = try network.rate_limiter.?.reserve("127.0.0.1", start);
try page.navigate("http://127.0.0.1:9582/src/browser/tests/runner/runner1.html", .{});
try testing.expectEqual(1, http_client.delayed_count);
// A delayed navigation is in-flight work: the wait must not resolve early.