Add sleep to test to wait for key replication

This commit is contained in:
Cody Soyland 2018-07-31 12:11:21 -05:00
parent e79cd4b199
commit 0816ea8ecb

View file

@ -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