From 99c58fc561948784d4c328ba6d64c6550dc7e240 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Fri, 15 Dec 2017 16:14:44 -0600 Subject: [PATCH] enable logging for wal_generator and set timeout to 1 min Refs #977 --- consensus/wal_generator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index b1ea268e3..00da98f71 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -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) } }