These instructions, while possibly still useful, are out of date as command line flags have changed and tools been phased out. Some of the incantations below have been updated, others have not. Please use common sense and update this document with improvements.
Here is a list of recent Go test failures, in case you wanted to check out a few. CI jobs file issues when a test fails on a release branch, and an owning team is determined according to TEAMS.yaml and the CODEOWNERS file. That team is then mentioned (to notify it) and the issue is put into the team’s Github project’s triage column.
...
If this doesn’t yield a reproduction in due time, you could try under race (add --race
flag) or adjust the --stress-args
(see bin/stress --help
, possibly after ./dev build stress
)level of parallelism:
Code Block |
---|
./dev test --stress $PKG --filter $TEST [--race] -stress-argscpus 20 '--maxtime 15m --pjobs 12'20 |
Other Notes:
To print the full logs of the failed test trial, add
--show-logs
to your test cmd. Run./dev test --help
to see this option. (The CRDB logs are default saved to a temp dir, but the path to that dir is currently broken).If you’re trying to reproduce an instance of a slow or hanging test, add a per trial timeout (i.e. fail if a test trial takes longer than 5 minutes), add
--test-args='-test.timeout 5m'
to your test cmd.test-args
are passed directly togo test
whose binary is executed for every trial in stress; therefore,--test-args
can be treated as ‘per trial’ args.Build tags are passed like this (note the
--
args separator):Code Block ./dev test --stress $PKG --filter $TEST -- --define gotags=bazel,gss,deadlock
...