Skip to content

Commit

Permalink
Merge #55526
Browse files Browse the repository at this point in the history
55526: backupccl: deflake a test r=yuzefovich a=yuzefovich

I've just hit a test flake on one of my branches because the order of the
schemas in the output was different from the expected one which appears
to be due to the queries not having an ORDER BY clause. That is now
fixed which should make the test output deterministic.

Release note: None

Co-authored-by: Yahor Yuzefovich <[email protected]>
  • Loading branch information
craig[bot] and yuzefovich committed Oct 13, 2020
2 parents 1ec2c45 + 5da8b87 commit e8757eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ccl/backupccl/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6479,7 +6479,7 @@ func TestCleanupDoesNotDeleteParentsWithChildObjects(t *testing.T) {

// Check that the restored database still exists, but only contains the new
// schema we added.
sqlDB.CheckQueryResults(t, `SELECT schema_name FROM [SHOW SCHEMAS FROM d]`, [][]string{
sqlDB.CheckQueryResults(t, `SELECT schema_name FROM [SHOW SCHEMAS FROM d] ORDER BY 1`, [][]string{
{"crdb_internal"}, {"information_schema"}, {"new_schema"}, {"pg_catalog"}, {"pg_extension"}, {"public"},
})
sqlDB.CheckQueryResults(t, `SHOW TABLES FROM d`, [][]string{})
Expand Down Expand Up @@ -6537,7 +6537,7 @@ func TestCleanupDoesNotDeleteParentsWithChildObjects(t *testing.T) {

// Check that the restored database still exists, but only contains the new
// table we added.
sqlDB.CheckQueryResults(t, `SELECT schema_name FROM [SHOW SCHEMAS FROM d]`, [][]string{
sqlDB.CheckQueryResults(t, `SELECT schema_name FROM [SHOW SCHEMAS FROM d] ORDER BY 1`, [][]string{
{"crdb_internal"}, {"information_schema"}, {"pg_catalog"}, {"pg_extension"}, {"public"},
})
sqlDB.CheckQueryResults(t, `SELECT schema_name, table_name FROM [SHOW TABLES FROM d]`, [][]string{
Expand Down Expand Up @@ -6606,7 +6606,7 @@ func TestCleanupDoesNotDeleteParentsWithChildObjects(t *testing.T) {
require.NoError(t, g.Wait())

sqlDB.Exec(t, `USE newdb`)
sqlDB.CheckQueryResults(t, `SELECT schema_name from [SHOW SCHEMAS FROM newdb]`, [][]string{
sqlDB.CheckQueryResults(t, `SELECT schema_name from [SHOW SCHEMAS FROM newdb] ORDER BY 1`, [][]string{
{"crdb_internal"}, {"information_schema"}, {"pg_catalog"}, {"pg_extension"}, {"public"}, {"sc"},
})
sqlDB.CheckQueryResults(t, `SELECT schema_name, table_name FROM [SHOW TABLES FROM sc]`, [][]string{
Expand Down

0 comments on commit e8757eb

Please sign in to comment.