Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

stress{,race}

./dev test --stress pkg/something $PKG --filter '^MyTestName$'"^$TEST"; ideally on a gceworker (to avoid clogging your work station).

If this doesn’t yield a reproduction in due time, you could try under race (add --race flag) or adjust the --stress-args (see stress --help, from github.com/cockroachdb/stress):

Code Block
./dev test --stress $PKG --filter $TEST --stress-args '-maxtime 15m'

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 to go 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/kv/kvserver/$PKG --filter TestReplicaClosedTimestamp$TEST -- \
        --define gotags=bazel,gss,deadlock

...