Skip to content

Commit

Permalink
assert no matter the order of the results
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Jan 26, 2023
1 parent 91be117 commit 605d416
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/test/endtoend/vtgate/queries/misc/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ func TestCast(t *testing.T) {
mcmp.AssertMatches("select cast('3.2' as unsigned)", `[[UINT64(3)]]`)
}

// TestCast tests the queries that contain the cast function.
func TestOuterJoinWithPredicate(t *testing.T) {
mcmp, closer := start(t)
defer closer()
Expand All @@ -198,8 +197,8 @@ func TestOuterJoinWithPredicate(t *testing.T) {

mcmp.Exec("insert into t1(id1, id2) values (0,0), (1,10), (2,20), (3,30), (4,40)")

mcmp.AssertMatches("select A.id1, B.id2 from t1 as A left join t1 as B on A.id1*10 = B.id2 WHERE B.id2 BETWEEN 20 AND 30",
mcmp.AssertMatchesNoOrder("select A.id1, B.id2 from t1 as A left join t1 as B on A.id1*10 = B.id2 WHERE B.id2 BETWEEN 20 AND 30",
`[[INT64(2) INT64(20)] [INT64(3) INT64(30)]]`)
mcmp.AssertMatches("select A.id1, B.id2 from t1 as A left join t1 as B on A.id1*10 = B.id2 WHERE B.id2 NOT BETWEEN 20 AND 30",
mcmp.AssertMatchesNoOrder("select A.id1, B.id2 from t1 as A left join t1 as B on A.id1*10 = B.id2 WHERE B.id2 NOT BETWEEN 20 AND 30",
`[[INT64(0) INT64(0)] [INT64(1) INT64(10)] [INT64(4) INT64(40)]]`)
}

0 comments on commit 605d416

Please sign in to comment.