Skip to content

Commit

Permalink
[chore] Fix TestConnectorConsume/incomplete_traces_with_virtual_serve…
Browse files Browse the repository at this point in the history
…r_span failures on Windows (open-telemetry#34798)

**Description:**
The failure is due to similar case as explained at
open-telemetry#32715 (comment)

This is a quick fix that just adds a delay to ensure that the test is
passing on Windows.

**Link to tracking Issue:**
Fixes open-telemetry#34792

**Testing:**
Local Windows test run.

**Documentation:**
N/A
  • Loading branch information
pjanotti authored Aug 22, 2024
1 parent 5802962 commit be3e358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions connector/servicegraphconnector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func TestConnectorConsume(t *testing.T) {
assert.NoError(t, conn.ConsumeTraces(context.Background(), tc.sampleTraces))

// Force collection
if runtime.GOOS == "windows" {
// On Windows timing doesn't tick forward quickly for the store data to expire, force a wait before expiring.
time.Sleep(time.Second)
}
conn.store.Expire()
md, err := conn.buildMetrics()
assert.NoError(t, err)
Expand Down

0 comments on commit be3e358

Please sign in to comment.