elastic / elastic/apm-server

test: flaky TestAddExpvarMetrics

Open
#21,209 0 comments 0 reactions 0 assignees View on GitHub
bug flaky test
Dominant language
Go
Stars
1.3k
Forks
543
Avg merge
1d 18h
Merged PRs (30d)
109

Description

https://github.com/elastic/apm-server/actions/runs/27567049707/job/81493620403?pr=21208

```
[37](https://github.com/elastic/apm-server/actions/runs/27567049707/job/81493620403?pr=21208#step:6:338)
=== RUN TestAddExpvarMetrics
=== RUN TestAddExpvarMetrics/with_false_detailed_flag_and_no_error_resp
main_test.go:220:
Error Trace: /home/runner/work/apm-server/apm-server/systemtest/benchtest/main_test.go:220
Error: Not equal:
expected: map[string]float64{"events/sec":10}
actual : map[string]float64{"events/sec":0}

Diff:
--- Expected
+++ Actual
@@ -1,3 +1,3 @@
(map[string]float64) (len=1) {
- (string) (len=10) "events/sec": (float64) 10
+ (string) (len=10) "events/sec": (float64) 0
}
Test: TestAddExpvarMetrics/with_false_detailed_flag_and_no_error_resp
=== RUN TestAddExpvarMetrics/with_false_detailed_flag_and_error_resp
=== RUN TestAddExpvarMetrics/with_true_detailed_flag_and_error_resp
--- FAIL: TestAddExpvarMetrics (0.40s)
--- FAIL: TestAddExpvarMetrics/with_false_detailed_flag_and_no_error_resp (0.14s)
--- PASS: TestAddExpvarMetrics/with_false_detailed_flag_and_error_resp (0.14s)
--- PASS: TestAddExpvarMetrics/with_true_detailed_flag_and_error_resp (0.12s)
FAIL
FAIL github.com/elastic/apm-server/systemtest/benchtest 12.688s
```

Contributor guide

Open the contributing guide

Research direction

Start with systemtest/benchtest/main_test.go:220 and the TestAddExpvarMetrics subtest shown in the CI failure. Run the test repeatedly or inspect its setup to determine why events/sec is sometimes 0 instead of 10; done means the test reliably passes for all listed flag and response cases.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.