Skip to content

Commit

Permalink
(internal/otelarrow) Fix timing test flake (open-telemetry#36070)
Browse files Browse the repository at this point in the history
#### Description

Fixes MRU_Reset test.

#### Link to tracking issue

Fixes open-telemetry#34252 

#### Testing

This repairs a test by ensuring that a clock advances. 

#### Documentation

n/a
  • Loading branch information
jmacd authored and sbylica-splunk committed Dec 17, 2024
1 parent a4499a4 commit 1f586a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/otelarrow/compression/zstd/mru_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ func TestMRUReset(t *testing.T) {
require.Equal(t, 1, m.Size())

// Ensure the monotonic clock has has advanced before resetting.
time.Sleep(10 * time.Millisecond)
for time.Since(time.Time(g)) <= 0 {
time.Sleep(10 * time.Millisecond)
}

m.Reset()
require.Equal(t, 0, m.Size())
Expand Down

0 comments on commit 1f586a7

Please sign in to comment.