MCPcopy
hub / github.com/redis/go-redis / TestWantConnQueue_newWantConnQueue

Function TestWantConnQueue_newWantConnQueue

internal/pool/want_conn_test.go:195–206  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

193}
194
195func TestWantConnQueue_newWantConnQueue(t *testing.T) {
196 q := newWantConnQueue()
197 if q == nil {
198 t.Fatal("newWantConnQueue() returned nil")
199 }
200 if q.items == nil {
201 t.Error("queue items should be initialized")
202 }
203 if len(q.items) != 0 {
204 t.Errorf("new queue length = %d, want 0", len(q.items))
205 }
206}
207
208func TestWantConnQueue_enqueue_dequeue(t *testing.T) {
209 q := newWantConnQueue()

Callers

nothing calls this directly

Calls 2

newWantConnQueueFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected