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 tests #237

Open
17 of 25 tasks
decentral1se opened this issue Nov 29, 2022 · 6 comments
Open
17 of 25 tasks

Fix flaky tests #237

decentral1se opened this issue Nov 29, 2022 · 6 comments
Labels

Comments

@decentral1se
Copy link
Member

decentral1se commented Nov 29, 2022

How to help

  • Pick a test from the list below πŸ—’οΈ
  • Run the test over and over again until you see a failure (see below for HOWTO) πŸƒβ€β™€οΈ
  • If it fails, open up an issue to document your digging (e.g. TestMigrate test flakyΒ #257) πŸ€“
  • Try to submit a fix πŸ˜„
  • If it doesn't fail after $a_lot_of_runs, let's re-enable it (e.g. Re-enable TestStatusCalls testΒ #256) 🌞

Good Luck πŸ§‘β€πŸš’ πŸ‘·β€β™€οΈ

Testing the tests

cd graph
LIBRARIAN_WRITEALL=0 go test -v ./ -run TestBadger | tee -a test.log # wait $a_while
cat test.log | grep FAIL # check for failures
cat test.log | grep PASS$ | wc -l # count passes

TODO

@KyleMaas

This comment was marked as outdated.

@KyleMaas
Copy link
Contributor

That's a much better format.

@KyleMaas
Copy link
Contributor

Of note: if the tests are logging ANSI escape sequences, see this for how to filter them out:

https://superuser.com/questions/380772/removing-ansi-color-codes-from-text-stream

@KyleMaas
Copy link
Contributor

Example command to run a test over and over again while filtering ANSI escapes:

watch 'LIBRARIAN_WRITEALL=0 go test -v ./ -run TestNullFeed | sed -e '"'"'s/\x1b\[[0-9;]*m//g'"'"' | tee -a ~/testlog.txt'

@KyleMaas
Copy link
Contributor

KyleMaas commented Jan 2, 2023

Quick note: The TestInvalidFuzzed item is pointing to the draft pull request I closed and not the merged one.

decentral1se added a commit to decentral1se/ssb that referenced this issue Jan 6, 2023
decentral1se added a commit to decentral1se/ssb that referenced this issue Jan 6, 2023
decentral1se added a commit to decentral1se/ssb that referenced this issue Jan 6, 2023
@decentral1se
Copy link
Member Author

OK, that's every failure mapped out into an issue πŸ˜…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants