From 0adfdffa8252c911afb71d348cafc5f35e4b3068 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 9 Aug 2017 10:23:58 +0200 Subject: pkg/log: fix tests with -count>0 --- pkg/log/log_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/log/log_test.go b/pkg/log/log_test.go index cb40aceab..3cbbfc655 100644 --- a/pkg/log/log_test.go +++ b/pkg/log/log_test.go @@ -7,6 +7,10 @@ import ( "testing" ) +func init() { + EnableLogCaching(4, 20) +} + func TestCaching(t *testing.T) { tests := []struct{ str, want string }{ {"", ""}, @@ -20,7 +24,6 @@ func TestCaching(t *testing.T) { {"hhhhhhhh", "ggggggg\nhhhhhhhh\n"}, {"jjjjjjjjjjjjjjjjjjjjjjjjj", "jjjjjjjjjjjjjjjjjjjjjjjjj\n"}, } - EnableLogCaching(4, 20) prependTime = false for _, test := range tests { Logf(1, test.str) -- cgit mrf-deployment