Browse Source

consensus: add note about replay test

pull/249/head
Ethan Buchman 8 years ago
parent
commit
678599c7d4
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      consensus/replay_test.go

+ 4
- 1
consensus/replay_test.go View File

@ -101,7 +101,10 @@ func waitForBlock(newBlockCh chan interface{}) {
func runReplayTest(t *testing.T, cs *ConsensusState, fileName string, newBlockCh chan interface{}) { func runReplayTest(t *testing.T, cs *ConsensusState, fileName string, newBlockCh chan interface{}) {
cs.config.Set("cswal", fileName) cs.config.Set("cswal", fileName)
cs.Start() cs.Start()
// wait to make a new block
// Wait to make a new block.
// This is just a signal that we haven't halted; its not something contained in the WAL itself.
// Assuming the consensus state is running, replay of any WAL, including the empty one,
// should eventually be followed by a new block, or else something is wrong
waitForBlock(newBlockCh) waitForBlock(newBlockCh)
cs.Stop() cs.Stop()
} }


Loading…
Cancel
Save