MCPcopy
hub / github.com/grafana/tempo / fakeServer

Function fakeServer

tempodb/backend/azure/azure_test.go:137–147  ·  tempodb/backend/azure/azure_test.go::fakeServer
(t *testing.T, returnIn time.Duration, counter *int32)

Source from the content-addressed store, hash-verified

135}
136
137func fakeServer(t *testing.T, returnIn time.Duration, counter *int32) *httptest.Server {
138 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
139 time.Sleep(returnIn)
140
141 atomic.AddInt32(counter, 1)
142 _, _ = w.Write([]byte(`{}`))
143 }))
144 t.Cleanup(server.Close)
145
146 return server
147}
148
149func TestReadError(t *testing.T) {
150 // confirm blobNotFoundError converts to ErrDoesNotExist

Callers 2

TestCredentialsFunction · 0.70
TestHedgeFunction · 0.70

Calls 2

SleepMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected