Skip to content

Commit

Permalink
[chore] Fix flaky test TestPersistentQueue_FullCapacity (open-telemet…
Browse files Browse the repository at this point in the history
…ry#8980)

Another fix for the flaky test `TestPersistentQueue_FullCapacity`. We
need to make sure that the first item is consumed from the queue before
proceeding. Otherwise, it can occasionally fail with:

```
--- FAIL: TestPersistentQueue_FullCapacity (0.00s)
    persistent_queue_test.go:91:
        	Error Trace:	/home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/internal/persistent_queue_test.go:91
        	Error:      	Received unexpected error:
        	            	sending queue is full
        	Test:       	TestPersistentQueue_FullCapacity
FAIL
```
  • Loading branch information
dmitryax authored and pantuza committed Dec 8, 2023
1 parent f44bc4c commit 957f647
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exporter/exporterhelper/internal/persistent_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func TestPersistentQueue_FullCapacity(t *testing.T) {

// First request is picked by the consumer. Wait until the consumer is blocked on done.
assert.NoError(t, pq.Offer(context.Background(), req))
start <- struct{}{}
close(start)

for i := 0; i < 10; i++ {
Expand Down

0 comments on commit 957f647

Please sign in to comment.