Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 9cd064e

Browse files
committed
Refactor integration test to run faster
We can reduce the sleep time on the timeout integration tests since the timeout is now not being confused between milliseconds and seconds.
1 parent b8e9be9 commit 9cd064e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/browser_context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ func TestBrowserContextTimeout(t *testing.T) {
639639
tb := newTestBrowser(t, withHTTPServer())
640640

641641
tb.withHandler("/slow", func(w http.ResponseWriter, _ *http.Request) {
642-
time.Sleep(1000 * time.Millisecond)
642+
time.Sleep(100 * time.Millisecond)
643643
fmt.Fprintf(w, `sorry for being so slow`)
644644
})
645645

tests/page_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ func TestPageTimeout(t *testing.T) {
10251025
tb := newTestBrowser(t, withHTTPServer())
10261026

10271027
tb.withHandler("/slow", func(w http.ResponseWriter, _ *http.Request) {
1028-
time.Sleep(1000 * time.Millisecond)
1028+
time.Sleep(100 * time.Millisecond)
10291029
fmt.Fprintf(w, `sorry for being so slow`)
10301030
})
10311031

0 commit comments

Comments
 (0)