Browse Source

abci: use no-op loggers in the examples (#7996)

This averts a rare but annoying log-after-test race condition.
pull/8007/head
M. J. Fromberger 3 years ago
committed by GitHub
parent
commit
8c5e36159e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      abci/example/example_test.go

+ 6
- 6
abci/example/example_test.go View File

@ -31,18 +31,18 @@ func init() {
func TestKVStore(t *testing.T) { func TestKVStore(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
logger := log.NewTestingLogger(t)
logger := log.NewNopLogger()
logger.Info("### Testing KVStore")
t.Log("### Testing KVStore")
testBulk(ctx, t, logger, kvstore.NewApplication()) testBulk(ctx, t, logger, kvstore.NewApplication())
} }
func TestBaseApp(t *testing.T) { func TestBaseApp(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
logger := log.NewTestingLogger(t)
logger := log.NewNopLogger()
logger.Info("### Testing BaseApp")
t.Log("### Testing BaseApp")
testBulk(ctx, t, logger, types.NewBaseApplication()) testBulk(ctx, t, logger, types.NewBaseApplication())
} }
@ -50,9 +50,9 @@ func TestGRPC(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
logger := log.NewTestingLogger(t)
logger := log.NewNopLogger()
logger.Info("### Testing GRPC")
t.Log("### Testing GRPC")
testGRPCSync(ctx, t, logger, types.NewGRPCApplication(types.NewBaseApplication())) testGRPCSync(ctx, t, logger, types.NewGRPCApplication(types.NewBaseApplication()))
} }


Loading…
Cancel
Save