Vector: Fix flaky `uptime_metrics` tests for macOS

Created on 28 Sep 2020  路  3Comments  路  Source: timberio/vector

https://github.com/timberio/vector/pull/3778#issuecomment-698622017 is still occasionally an issue in macOS CI tests. The interval fix I suggested in that thread seems to have fixed it locally, so I think this probably hints at it being a race condition of some kind.

bug

All 3 comments

I've isolated this failure to when the api tests are specifically run with 2 threads:

cargo test --test api -- --nocapture --test-threads 2

1 thread, or any number above 2 seems to pass consistently.

Interestingly, we have env RUST_TEST_THREADS=1 for our CI, does this means that RUST_TEST_THREADS not work?

RUST_TEST_THREADS works for me locally. I get the same (panicked) result with:

RUST_TEST_THREADS=2 cargo test --test api -- --nocapture

But not with any # other than 2.

Since CI is single threaded and is _still_ failing, the number of threads seems like a symptom rather than the cause of the problem. Will dig further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raghu999 picture raghu999  路  3Comments

binarylogic picture binarylogic  路  3Comments

jamtur01 picture jamtur01  路  3Comments

LucioFranco picture LucioFranco  路  3Comments

LucioFranco picture LucioFranco  路  3Comments