Remove flushdb race conditions in test