mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
apptest: Improve TestSingleVMAgentDropOnOverload stability (#10774)
Previosly the test could fail on resource constraint runners because
remoteWrite retry happens before the assertion in:
```
waitFor(
func() bool {
return vmagent.RemoteWriteRequests(t, url1) == 1 &&
vmagent.RemoteWriteRequests(t, url2) == 1
},
)
```
Because of retry the metric jumps to two and assert never satisfied.
The commit explisitly postpones retries so there is no race condition.
Failed CI job:
https://github.com/VictoriaMetrics/VictoriaMetrics/actions/runs/24186679213/job/70593055140
PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10774
<img width="1157" height="879" alt="Screenshot 2026-04-09 at 15 30 33"
src="https://github.com/user-attachments/assets/e170ae12-cf79-4501-a57b-fbd3612d31a0"
/>
This commit is contained in:
@@ -305,6 +305,11 @@ func TestSingleVMAgentDropOnOverload(t *testing.T) {
|
||||
// See initRemoteWriteCtxs function in remotewrite.go for details.
|
||||
"-remoteWrite.maxRowsPerBlock=1000000000",
|
||||
"-remoteWrite.tmpDataPath=" + tc.Dir() + "/vmagent",
|
||||
|
||||
// Delay retry logic to avoid race conditions with waitFor assertions.
|
||||
// It improves the test stability on resource-constrained runners.
|
||||
// Should be bigger than retries * period
|
||||
"-remoteWrite.retryMinInterval=3s",
|
||||
}, ``)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user