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 flaky rails4 test #1419

Merged
merged 1 commit into from Oct 28, 2019

Conversation

@adamkiczula
Copy link
Contributor

adamkiczula commented Oct 28, 2019

This fixes issue #1409

I found the failing seed with: while rake; do :; done
Failure can be reproduced with rake TESTOPTS="--seed=42281"

The cause is that the test_external_checks test is run first, so report hasn't been called yet. The result is that Brakeman::CheckExternalCheckTest isn't loaded yet, so the defined? assertion fails. Simply moving that assertion to after calling report fixes the test.

@presidentbeef presidentbeef merged commit 25fad31 into presidentbeef:master Oct 28, 2019
9 checks passed
9 checks passed
ci/circleci: default Your tests passed on CircleCI!
Details
ci/circleci: test-2-3 Your tests passed on CircleCI!
Details
ci/circleci: test-2-4 Your tests passed on CircleCI!
Details
ci/circleci: test-2-5 Your tests passed on CircleCI!
Details
ci/circleci: test-2-6 Your tests passed on CircleCI!
Details
ci/circleci: upload-coverage Your tests passed on CircleCI!
Details
codeclimate All good!
Details
codeclimate/diff-coverage 100% (98% threshold)
Details
codeclimate/total-coverage 95% (0.0% change)
Details
@presidentbeef

This comment has been minimized.

Copy link
Owner

presidentbeef commented Oct 28, 2019

🙇 🙇 🙇 Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.