MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestSharedHTTPClient

Function TestSharedHTTPClient

internal/utils/http_test.go:19–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17}
18
19func TestSharedHTTPClient(t *testing.T) {
20 a := assert.NewAssertion(t)
21
22 _ = SharedHttpClient(2 * time.Second)
23 _ = SharedHttpClient(3 * time.Second)
24
25 client := SharedHttpClient(1 * time.Second)
26 a.IsTrue(client.Timeout == 1*time.Second)
27
28 client2 := SharedHttpClient(1 * time.Second)
29 a.IsTrue(client == client2)
30
31 t.Log(timeoutClientMap)
32}

Callers

nothing calls this directly

Calls 2

SharedHttpClientFunction · 0.85
LogMethod · 0.80

Tested by

no test coverage detected