Skip to content

Commit

Permalink
Refactor integration test to run faster
Browse files Browse the repository at this point in the history
We can reduce the sleep time on the timeout integration tests since
the timeout is now not being confused between milliseconds and seconds.
  • Loading branch information
ankur22 committed Sep 18, 2023
1 parent b8e9be9 commit 9cd064e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/browser_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ func TestBrowserContextTimeout(t *testing.T) {
tb := newTestBrowser(t, withHTTPServer())

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

Expand Down
2 changes: 1 addition & 1 deletion tests/page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ func TestPageTimeout(t *testing.T) {
tb := newTestBrowser(t, withHTTPServer())

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

Expand Down

0 comments on commit 9cd064e

Please sign in to comment.