Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test stability improvements #1110

Merged
merged 5 commits into from
Dec 3, 2024
Merged

Test stability improvements #1110

merged 5 commits into from
Dec 3, 2024

Conversation

vigoo
Copy link
Contributor

@vigoo vigoo commented Dec 3, 2024

  • Less sleep ⏰
  • Timeouts/flakyness settings for sharding tests
  • Larger timeout for dynamic large memory allocation test
  • Removed hardcoded file sizes from tests

let mut events = vec![];
rx.recv_many(&mut events, 100).await;
let start_time = Instant::now();
while events.len() < 2 && start_time.elapsed() < Duration::from_secs(5) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can rely on test timeouts to limit the polling instead of inlining it into the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking more about it, it's harder to come up with a good timeout on the whole test, because things like the compilation time of the WASM are hard to predict (how slow it is on CI).
Saying "after the invocation is done, we wait at most 5 seconds for the async log fetching to return some things" feels easier to work with to me.


let (status1, _) = executor.get_worker_metadata(&worker_id).await.unwrap();
executor
.wait_for_status(&worker_id, WorkerStatus::Running, Duration::from_secs(5))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I would propose to just poll forever for the expected status and move operational matters such as timeouts fully into test framework configuration.

@vigoo vigoo enabled auto-merge (squash) December 3, 2024 15:57
@vigoo vigoo merged commit f45d8db into main Dec 3, 2024
18 checks passed
@vigoo vigoo deleted the test-stability branch December 3, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants