From bd690b4bb47876540222caf7b7675581dac43777 Mon Sep 17 00:00:00 2001 From: adityamaru Date: Thu, 27 Jul 2023 16:35:41 -0400 Subject: [PATCH] backupccl: deflake TestBackupAndRestoreJobDescription This change sorts the jobs based on when they were created to ensure we get a stable sort of job descriptions. Fixes: #107684 Release note: None --- pkg/ccl/backupccl/backup_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ccl/backupccl/backup_test.go b/pkg/ccl/backupccl/backup_test.go index c2bff8642ecc..ef45c188c5dd 100644 --- a/pkg/ccl/backupccl/backup_test.go +++ b/pkg/ccl/backupccl/backup_test.go @@ -897,7 +897,7 @@ func TestBackupAndRestoreJobDescription(t *testing.T) { resolvedAsOfCollectionURIs := getResolvedCollectionURIs(collections, asOf1) sqlDB.CheckQueryResults( - t, "SELECT description FROM [SHOW JOBS] WHERE job_type='RESTORE'", + t, "SELECT description FROM [SHOW JOBS] WHERE job_type='RESTORE' ORDER BY created", [][]string{ {fmt.Sprintf("RESTORE DATABASE data FROM ('%s', '%s', '%s')", backups[0].(string), backups[1].(string), backups[2].(string))},