(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestTaskQueue_Close(t *testing.T) { |
| 53 | q := NewTaskQueue() |
| 54 | q.Push(types.Task{Offset: 0, Length: 100}) |
| 55 | q.Close() |
| 56 | |
| 57 | // After close, Pop should still return existing tasks |
| 58 | if _, ok := q.Pop(); !ok { |
| 59 | t.Error("Pop should return existing task after Close") |
| 60 | } |
| 61 | |
| 62 | // Additional Pop should return false |
| 63 | if _, ok := q.Pop(); ok { |
| 64 | t.Error("Pop should return false after draining closed queue") |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestTaskQueue_DrainRemaining(t *testing.T) { |
| 69 | q := NewTaskQueue() |
nothing calls this directly
no test coverage detected