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 tests unable to fail #4013

Merged
merged 8 commits into from
Mar 1, 2021
Merged

Conversation

frol
Copy link
Collaborator

@frol frol commented Feb 25, 2021

Resolves #3901.

@frol
Copy link
Collaborator Author

frol commented Feb 27, 2021

The tests finally pass! The changes are essentially the following:

  1. I updated actix to the next beta
  2. I introduced near-actix-test-utils (in test-utils/actix-test-utils folder) with two helpers: run_actix_until_stop and run_actix_until_panic (the latter just does not print the stack trace)
  3. Replaced all the previous System::builder().stop_on_panic(true) with run_actix_until_stop or run_actix_until_panic (which stops actix System once a panic is caught in any of the actors)
  4. I increased some timeouts since given the implementation of run_actix_until_stop, we start hitting the node earlier than we used to do it
  5. I also replaced some .unwrap()s with proper handling since we often query the node before the chain is booted up (thus returning us an error that the latest block does not exist)

Overall, the tests were just slightly touched and now we have the CI passing and catching panic correctly.

P.S. To review, you may want to disable white-space changes in the diff

@frol frol added the automerge label Feb 28, 2021
@near-bulldozer near-bulldozer bot merged commit 69eddab into master Mar 1, 2021
@near-bulldozer near-bulldozer bot deleted the fix/fix-tests-unable-to-fail branch March 1, 2021 13:27
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.

After actix upgrade, panic are not always properly propagated, and tests that should_panic fail.
4 participants