|
|
|
@ -76,6 +76,10 @@ func Test_MultiNodeSimple(t *testing.T) {
|
|
|
|
|
t.Fatalf("wrong leader commit index, got: %d, exp: %d", got, exp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := s0.WaitCommitIndex(time.Second); err != nil {
|
|
|
|
|
t.Fatalf("failed to wait for commit index: %s", err.Error())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Now, do a NONE consistency query on each node, to actually confirm the data
|
|
|
|
|
// has been replicated.
|
|
|
|
|
testFn1 := func(t *testing.T, s *Store) {
|
|
|
|
@ -108,6 +112,10 @@ func Test_MultiNodeSimple(t *testing.T) {
|
|
|
|
|
t.Fatalf("wrong leader commit index, got: %d, exp: %d", got, exp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := s1.WaitCommitIndex(time.Second); err != nil {
|
|
|
|
|
t.Fatalf("failed to wait for commit index: %s", err.Error())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Write another row using Request
|
|
|
|
|
rr := executeQueryRequestFromString("INSERT INTO foo(id, name) VALUES(2, 'fiona')", proto.QueryRequest_QUERY_REQUEST_LEVEL_STRONG, false, false)
|
|
|
|
|
_, err = s0.Request(rr)
|
|
|
|
|