praefect: Immediately report failure in remove repository test
Part of #4274
Previously when there was an intermittent database failure the test
would block forever on ticker.Tick()
. When this happens the error
returned from removeReplicationEvents
is lost. Instead, mark the test
as failed. Note that we cannot use require.NoError
here because this
must be called in the parent test go routine.
I have checked that assert
does get formatted correctly by gotestsum:
=== FAIL: cmd/praefect TestRemoveRepository_removeReplicationEvents (0.20s)
subcmd_remove_repository_test.go:307:
Error Trace: subcmd_remove_repository_test.go:307
asm_amd64.s:1581
Error: Received unexpected error:
this is a test
Test: TestRemoveRepository_removeReplicationEvents
Since assert doesn't exit immediately we're hoping that although the test still times out after 10 minutes we still get the error reported.