Skip to content

Commit fbd79aa

Browse files
authored
enable failures for query fuzzer test (#5225)
Signed-off-by: Ben Ye <[email protected]>
1 parent 9435796 commit fbd79aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

integration/query_fuzz_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func TestVerticalShardingFuzz(t *testing.T) {
157157
})
158158
}
159159

160+
failures := 0
160161
for i, tc := range cases {
161162
qt := "instant query"
162163
if !tc.instantQuery {
@@ -165,11 +166,16 @@ func TestVerticalShardingFuzz(t *testing.T) {
165166
if tc.err1 != nil || tc.err2 != nil {
166167
if !cmp.Equal(tc.err1, tc.err2) {
167168
t.Logf("case %d error mismatch.\n%s: %s\nerr1: %v\nerr2: %v\n", i, qt, tc.query, tc.err1, tc.err2)
169+
failures++
168170
}
169171
} else if !sameModelValue(tc.res1, tc.res2) {
170172
t.Logf("case %d results mismatch.\n%s: %s\nres1: %s\nres2: %s\n", i, qt, tc.query, tc.res1.String(), tc.res2.String())
173+
failures++
171174
}
172175
}
176+
if failures > 0 {
177+
require.Fail(t, "failed %d test cases", failures)
178+
}
173179
}
174180

175181
func sameModelValue(a model.Value, b model.Value) bool {

0 commit comments

Comments
 (0)