Browse Source

enable logging for wal_generator and set timeout to 1 min

Refs #977
pull/983/head
Anton Kaliaev 7 years ago
parent
commit
f8f28c8942
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      consensus/wal_generator.go

+ 3
- 3
consensus/wal_generator.go View File

@ -32,7 +32,7 @@ func WALWithNBlocks(numBlocks int) (data []byte, err error) {
app := dummy.NewPersistentDummyApplication(filepath.Join(config.DBDir(), "wal_generator"))
logger := log.NewNopLogger() // log.TestingLogger().With("wal_generator", "wal_generator")
logger := log.TestingLogger().With("wal_generator", "wal_generator")
/////////////////////////////////////////////////////////////////////////////
// COPY PASTE FROM node.go WITH A FEW MODIFICATIONS
@ -91,8 +91,8 @@ func WALWithNBlocks(numBlocks int) (data []byte, err error) {
case <-numBlocksWritten:
wr.Flush()
return b.Bytes(), nil
case <-time.After(time.Duration(5*numBlocks) * time.Second):
return b.Bytes(), fmt.Errorf("waited too long for tendermint to produce %d blocks", numBlocks)
case <-time.After(1 * time.Minute):
return b.Bytes(), fmt.Errorf("waited too long for tendermint to produce %d blocks (grep logs for `wal_generator`)", numBlocks)
}
}


Loading…
Cancel
Save