From d4d2f5ae5c5c86359fdf68b4deafe3f23e8dec86 Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Sun, 22 May 2016 13:40:50 -0700 Subject: [PATCH] Fix flapper test --- server/monitor_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/monitor_test.go b/server/monitor_test.go index d7b11998..93cbf11a 100644 --- a/server/monitor_test.go +++ b/server/monitor_test.go @@ -432,11 +432,9 @@ func TestConnzLastActivity(t *testing.T) { t.Fatalf("Un-subscribe should have triggered update to LastActivity\n") } - // On Windows, looks like the precision is too low, and if we - // don't wait, first and last would be equal. - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } + // Just wait a bit to make sure that there is a difference + // between first and last. + time.Sleep(100 * time.Millisecond) // Message delivery should trigger as well nc2.Publish("foo", []byte("Hello"))