aboutsummaryrefslogtreecommitdiff
path: root/lib/http/endpoint_response_example_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-29 02:57:27 +0700
committerShulhan <ms@kilabit.info>2022-08-29 02:57:27 +0700
commita2f45e834763305b416d78406066764899bf0f7c (patch)
tree81b0a5464ae5207bc6563f737818b7f232bf2a21 /lib/http/endpoint_response_example_test.go
parent53c9e1165011b8c3474f1c124b8db8799878002c (diff)
downloadpakakeh.go-a2f45e834763305b416d78406066764899bf0f7c.tar.xz
lib/http: increase time sleep waiting for server on example endpoint
On container, sometimes the test fail with the following error 2022-08-28 19:32:21 UTC DefaultErrorHandler: POST /error/custom: Custom error 2022/08/28 19:32:22 Do: Get "http://127.0.0.1:7016/?": dial tcp 127.0.0.1:7016: connect: connection refused FAIL github.com/shuLhan/share/lib/http 1.583s This was caused by server is not ready yet to accept connection when testing executed.
Diffstat (limited to 'lib/http/endpoint_response_example_test.go')
-rw-r--r--lib/http/endpoint_response_example_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http/endpoint_response_example_test.go b/lib/http/endpoint_response_example_test.go
index 5e953f1b..f0bbec6d 100644
--- a/lib/http/endpoint_response_example_test.go
+++ b/lib/http/endpoint_response_example_test.go
@@ -65,7 +65,7 @@ func ExampleEndpointResponse() {
log.Fatal(err)
}
}()
- time.Sleep(500)
+ time.Sleep(1 * time.Second)
clientOpts := &ClientOptions{
ServerUrl: "http://127.0.0.1:7016",