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 flakey rust tests #3435

Merged

Conversation

philipr-za
Copy link
Contributor

Description

This PR aims to fix the following flakey tests:

  1. test_txo_validation
  2. test_transaction_resending

The fix for 1 was to put in an explicit wait for the validation protocol to complete, on the slower CI system is seems that the validation protocol was slow to update the database state before the main test queried the balance.

The fix for 2 is to increase the cool down and resend times to make them more resilient to the slower CI environment. The current times were quite tight which was fine on a local dev machine. This might still prove to be flakey in the future.

How Has This Been Tested?

These are fixes to tests

This PR aims to fix the following flakey tests:
1. `test_txo_validation`
2. `test_transaction_resending`

The fix for 1 was to put in an explicit wait for the validation protocol to complete, on the slower CI system is seems that the validation protocol was slow to update the database state before the main test queried the balance.

The fix for 2 is to increase the cool down and resend times to make them more resilient to the slower CI environment. The current times were quite tight which was fine on a local dev machine. This might still prove to be flakey in the future.
Copy link
Contributor

@delta1 delta1 left a comment

Choose a reason for hiding this comment

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

LGTM untested

.is_err());

// Wait for the cooldown to expire but before the resend period has elapsed see if a repeat illicts a reponse.
runtime.block_on(async { sleep(Duration::from_secs(2)).await });
// Wait for the cooldown to expire but before the resend period has elapsed see if a repeat illicts a response.
Copy link
Contributor

Choose a reason for hiding this comment

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

lol

Suggested change
// Wait for the cooldown to expire but before the resend period has elapsed see if a repeat illicts a response.
// Wait for the cooldown to expire but before the resend period has elapsed see if a repeat elicits a response.

Copy link
Collaborator

Choose a reason for hiding this comment

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

lol

@aviator-app aviator-app bot merged commit 7384201 into tari-project:development Oct 8, 2021
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.

3 participants