From 13e3141a2a4e7d5930d976d6e5d04c81d557dd68 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Wed, 22 Jun 2022 11:20:13 +0200 Subject: [PATCH] add delay to conn over http --- conn_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn_test.go b/conn_test.go index 591ef13..141c102 100644 --- a/conn_test.go +++ b/conn_test.go @@ -88,7 +88,7 @@ func TestHTTPRWConn(t *testing.T) { flusher.Flush() fw := &flushWrite{w: w, f: flusher} doneCh := make(chan struct{}) - c2 = NewConn(r.Body, fw, SetCloseHook(func() { + c2 = NewConn(r.Body, fw, SetWriteDelay(500*time.Millisecond), SetCloseHook(func() { // exit the handler close(doneCh) }))