(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func TestMultiQueue(t *testing.T) { |
| 25 | queue := NewOverwriteQueues("whatever", 15, 1) |
| 26 | wg := sync.WaitGroup{} |
| 27 | wg.Add(1) |
| 28 | go func() { |
| 29 | if item := queue.Get(7); item != 10086 { |
| 30 | t.Errorf("Expected 10086, actually %d", item) |
| 31 | } |
| 32 | wg.Done() |
| 33 | }() |
| 34 | queue.Put(7, 10086) |
| 35 | wg.Wait() |
| 36 | if len(queue) != 16 { |
| 37 | t.Errorf("Expected 16, actually %d", len(queue)) |
| 38 | } |
| 39 | } |
nothing calls this directly
no test coverage detected