1
0
Fork 0

Add failing unit test

master
Philip O'Toole 8 months ago committed by GitHub
parent 84bc4c9e6f
commit 23ce0583a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1128,6 +1128,7 @@ func Test_SingleNodeExecuteQueryFreshness(t *testing.T) {
if err != nil {
t.Fatalf("failed to wait for fsmIndex: %s", err.Error())
}
qr := queryRequestFromString("SELECT * FROM foo", false, false)
qr.Level = proto.QueryRequest_QUERY_REQUEST_LEVEL_NONE
qr.Freshness = mustParseDuration("1ns").Nanoseconds()
@ -1141,6 +1142,17 @@ func Test_SingleNodeExecuteQueryFreshness(t *testing.T) {
if exp, got := `[[1,"fiona"]]`, asJSON(r[0].Values); exp != got {
t.Fatalf("unexpected results for query\nexp: %s\ngot: %s", exp, got)
}
rr := executeQueryRequestFromString("SELECT * FROM foo", proto.QueryRequest_QUERY_REQUEST_LEVEL_NONE,
false, false)
rr.Freshness = mustParseDuration("1ns").Nanoseconds()
er, err = s0.Request(rr)
if err != nil {
t.Fatalf("failed to query leader node: %s", err.Error())
}
if exp, got := `[[1,"fiona"]]`, asJSON(r[0].Values); exp != got {
t.Fatalf("unexpected results for query\nexp: %s\ngot: %s", exp, got)
}
}
// Test_SingleNodeBackup tests that a Store correctly backs up its data

Loading…
Cancel
Save