elastic / elastic/go-docappender
Flaky `TestAppenderRetryDocument` unit test
- Dominant language
- Go
- Stars
- 11
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
This happens on very rare occasions in CI.
```shell
=== RUN TestAppenderRetryDocument/nocompression
appender_test.go:1331:
Error Trace: /home/runner/work/go-docappender/go-docappender/appender_test.go:1331
Error: Not equal:
expected: 1
actual : 0
Test: TestAppenderRetryDocument/nocompression
docappendertest.go:241:
Error Trace: /home/runner/work/go-docappender/go-docappender/docappendertest/docappendertest.go:241
/home/runner/work/go-docappender/go-docappender/appender_test.go:1346
/home/runner/work/go-docappender/go-docappender/docappendertest/docappendertest.go:251
/home/runner/work/go-docappender/go-docappender/appender_test.go:1343
Error: Not equal:
expected: attribute.Set{equivalent:attribute.Distinct{iface:[1]attribute.KeyValue{attribute.KeyValue{Key:"greatest_retry", Value:attribute.Value{vtype:2, numeric:0x2, stringly:"", slice:interface {}(nil)}}}}}
actual : attribute.Set{equivalent:attribute.Distinct{iface:[1]attribute.KeyValue{attribute.KeyValue{Key:"greatest_retry", Value:attribute.Value{vtype:2, numeric:0x1, stringly:"", slice:interface {}(nil)}}}}}
Diff:
--- Expected
+++ Actual
@@ -7,3 +7,3 @@
vtype: (attribute.Type) 2,
- numeric: (uint64) 2,
+ numeric: (uint64) 1,
stringly: (string) "",
Test: TestAppenderRetryDocument/nocompression
appender_test.go:1351:
Error Trace: /home/runner/work/go-docappender/go-docappender/appender_test.go:1351
Error: Not equal:
expected: 2
actual : 1
Test: TestAppenderRetryDocument/nocompression
=== RUN TestAppenderRetryDocument/gzip
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with TestAppenderRetryDocument in appender_test.go, especially the failures around lines 1331, 1343, 1346, and 1351, then inspect the referenced checks in docappendertest/docappendertest.go. Run the test repeatedly, including the nocompression and gzip cases, to reproduce the retry-count mismatch. Done means the test passes reliably in CI without the observed flaky result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100