Skip to content

Commit 31631f0

Browse files
committed
fix brittle api call abort request test
1 parent 28dda95 commit 31631f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

typesense/api_call_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ func TestApiCallCanAbortRequest(t *testing.T) {
374374
func(_ http.ResponseWriter, r *http.Request) {
375375
appendHistory(&requestURLHistory, r)
376376
cancel()
377+
// block until the client closes the connection
378+
<-r.Context().Done()
377379
},
378380
func(_ http.ResponseWriter, r *http.Request) {
379381
appendHistory(&requestURLHistory, r)

0 commit comments

Comments
 (0)