diff --git a/server/handler_test.go b/server/handler_test.go index 954523e04..5617c8ffa 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -24,6 +24,7 @@ import ( "reflect" "strings" "testing" + "time" gohttp "net/http" @@ -675,6 +676,9 @@ func TestClusterTranslator(t *testing.T) { test.MustDo("POST", cluster[0].URL()+"/index/i0/query", "Set(\"foo\", f0=\"bar\")") + // wait for key to replicate to second node + time.Sleep(100 * time.Millisecond) + result0 := test.MustDo("POST", cluster[0].URL()+"/index/i0/query", "Row(f0=\"bar\")").Body result1 := test.MustDo("POST", cluster[1].URL()+"/index/i0/query", "Row(f0=\"bar\")").Body