From 30f8573c7801bad32d3539955539328b5501b5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Tisa=CC=88ter?= Date: Fri, 9 May 2014 02:36:25 +0200 Subject: [PATCH] Change blocking call sleep time --- consul/catalog_endpoint_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/consul/catalog_endpoint_test.go b/consul/catalog_endpoint_test.go index 25a35dba0..3db8be3f2 100644 --- a/consul/catalog_endpoint_test.go +++ b/consul/catalog_endpoint_test.go @@ -482,7 +482,7 @@ func TestCatalogListServices_Blocking(t *testing.T) { // Async cause a change start := time.Now() go func() { - time.Sleep(50 * time.Millisecond) + time.Sleep(100 * time.Millisecond) s1.fsm.State().EnsureNode(1, structs.Node{"foo", "127.0.0.1"}) s1.fsm.State().EnsureService(2, "foo", &structs.NodeService{"db", "db", []string{"primary"}, 5000}) }() @@ -494,7 +494,7 @@ func TestCatalogListServices_Blocking(t *testing.T) { } // Should block at least 100ms - if time.Now().Sub(start) < 50 * time.Millisecond { + if time.Now().Sub(start) < 100 * time.Millisecond { t.Fatalf("too fast") } @@ -530,7 +530,7 @@ func TestCatalogListServices_Timeout(t *testing.T) { // Setup a blocking query args.MinQueryIndex = out.Index - args.MaxQueryTime = 50 * time.Millisecond + args.MaxQueryTime = 100 * time.Millisecond // Re-run the query start := time.Now() @@ -540,7 +540,7 @@ func TestCatalogListServices_Timeout(t *testing.T) { } // Should block at least 100ms - if time.Now().Sub(start) < 50 * time.Millisecond { + if time.Now().Sub(start) < 100 * time.Millisecond { t.Fatalf("too fast") }