test: fix flaky test
A race condition in TestSendSamplesWithBackoffWithSampleAgeLimit was observed in CI where the sample age limit was too close to the backoff time, causing samples to be dropped intermittently. Increasing the SampleAgeLimit resolves the problem. Signed-off-by: Adam Bernot <bernot@google.com>
This commit is contained in:
parent
8cf67d99ba
commit
575a60ec92
|
@ -2003,7 +2003,7 @@ func TestIsSampleOld(t *testing.T) {
|
||||||
func TestSendSamplesWithBackoffWithSampleAgeLimit(t *testing.T) {
|
func TestSendSamplesWithBackoffWithSampleAgeLimit(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
maxSamplesPerSend := 10
|
maxSamplesPerSend := 10
|
||||||
sampleAgeLimit := time.Second
|
sampleAgeLimit := time.Second * 2
|
||||||
|
|
||||||
cfg := config.DefaultQueueConfig
|
cfg := config.DefaultQueueConfig
|
||||||
cfg.MaxShards = 1
|
cfg.MaxShards = 1
|
||||||
|
|
Loading…
Reference in New Issue