Use stress command to catch flaky tests.

Example

For example, I’m trying to catch a panic in TestPostToCommunityChat in MessengerCommunitiesShardingSuite.

  1. Compile the package tests into a binary

    go test -c ./protocol
    
  2. Run stress tests:

    stress \\
    	-count 1000 '
    	./protocol.test \\
    	-test.run TestMessengerCommunitiesShardingSuite \\
    	-testify.m TestPostToCommunityChat