A pending transaction delays unittests by 15 seconds
If a test finishes and there are still some pending write intents, the heartbeat goroutine stays alive for about 15 seconds, not allowing the test to terminate. We should put in a mechanism to shut it down and report it (fail) but not let the test hang.
This is not an issue with any current tests. It's just when you write a new test and you make a mistake, it can be painful to debug.
it's not the pending intents. It's a missing EndTransaction which keeps a heartbeat running. The stopper will tell you the running task while draining, so it seems fairly easy to debug (what else would you want?)
Anyways, for tests in the kv package there is already a helper teardownHeartbeats() which does precisely that. But I don't think we should use that in new tests, rather fix up the old ones and remove it.
I'm actually happy that missing an EndTransaction is noticeable. Would hate for that to just not cause an issue at teardown.
go test -v and look for the running tasks while draining.