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

fix: fix flaky unstable network tests #5013

Closed

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Aug 27, 2024

Context

We have unstable_network tests which are constantly failing in the CI.

Solution

Solutions consist of multiple parts:

  • @SamHSmith fix to use only genesis peer as client introduced in fix: Fix bug in test harness for unstable network #4980
  • Remove fixed time polling mechanism in favor of event based solution without fixed timeout
    • Idea is that external timeout is anyway exist which would cut off test execution if it takes too long
  • Increase transactions ttl to prevent the case when transaction is expired before end up in the committed block

@Erigara Erigara added the Tests label Aug 27, 2024
@Erigara Erigara self-assigned this Aug 27, 2024
@Erigara Erigara changed the title Fix flaky unstable network tests fix: fix flaky unstable network tests Aug 27, 2024
@Erigara
Copy link
Contributor Author

Erigara commented Aug 27, 2024

Ok, i can see that unstable_network tests passed, but the rest of extra_functional tests are still not working with failure to wait for genesis.

Probably i should apply new async genesis await mechanism for them as well.

@Erigara Erigara force-pushed the fix_flaky_unstable_network_tests branch 2 times, most recently from 4192f5b to 85207ce Compare August 29, 2024 11:40
@mversic mversic force-pushed the fix_flaky_unstable_network_tests branch from 85207ce to fe216de Compare September 4, 2024 07:16
@Erigara Erigara force-pushed the fix_flaky_unstable_network_tests branch from fe216de to 67c62b6 Compare September 5, 2024 12:14
@Erigara Erigara marked this pull request as ready for review September 5, 2024 12:39
Comment on lines +31 to +32
iroha.transaction_ttl = Some(Duration::from_millis(u64::MAX));
iroha.transaction_status_timeout = Duration::from_millis(u64::MAX);
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider compressing into a method, this repeats often

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure it's wroth extracting into test_network because this function is kinda specific for this particular tests...

@@ -96,23 +97,22 @@ fn unstable_network(
quantity,
AssetId::new(asset_definition_id.clone(), account_id.clone()),
);
iroha.submit(mint_asset).expect("Failed to create asset.");
iroha
.submit_blocking(mint_asset)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we replace all uses of submit with submit_blocking and get rid of polling? Or does it matter less for non-extra-functional 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.

I think we should by default opt to submit_blocking and use submit in places where it's really required.

@Erigara
Copy link
Contributor Author

Erigara commented Sep 20, 2024

Closing for now in favor of #5087.

@Erigara Erigara closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants