MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / TestRunningQueriesConcurrent

Function TestRunningQueriesConcurrent

scope_test.go:204–216  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

202}
203
204func TestRunningQueriesConcurrent(t *testing.T) {
205 cu := &clusterUser{
206 maxConcurrentQueries: 10,
207 }
208 f := func() {
209 cu.queryCounter.inc()
210 cu.queryCounter.load()
211 cu.queryCounter.dec()
212 }
213 if err := testConcurrent(f, 1000); err != nil {
214 t.Fatalf("concurrent test err: %s", err)
215 }
216}
217
218func TestGetHostConcurrent(t *testing.T) {
219 c := &cluster{

Callers

nothing calls this directly

Calls 4

testConcurrentFunction · 0.85
incMethod · 0.45
loadMethod · 0.45
decMethod · 0.45

Tested by

no test coverage detected