Skip to content

Commit 077bcbc

Browse files
committed
schemachangerccl: bump up timeout for job completion
Previously, tests in the schema changer package waited up to 45 seconds for schema changes to complete. Unfortunately, certain schema changes involving ALTER PRIMARY KEY may have multiple backfills, where this timeout would not be sufficient. To address this, this patch extends the schema change timeout to 2 minutes to have these tests flake less. Fixes: #155696 Fixes: #155654 Release note: None
1 parent 2593003 commit 077bcbc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pkg/sql/schemachanger/sctest/framework.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -965,14 +965,13 @@ func waitForSchemaChangesToSucceed(t *testing.T, tdb *sqlutils.SQLRunner) {
965965
}
966966

967967
func waitForSchemaChangesToFinish(t *testing.T, tdb *sqlutils.SQLRunner) {
968-
// Wait longer on stress for schema changes.
969-
if skip.Stress() {
970-
old := tdb.SucceedsSoonDuration
971-
tdb.SucceedsSoonDuration = time.Minute * 2
972-
defer func() {
973-
tdb.SucceedsSoonDuration = old
974-
}()
975-
}
968+
// Schema changes in more complex tests can be slower, so give them
969+
// a lot more headroom to complete.
970+
old := tdb.SucceedsSoonDuration
971+
tdb.SucceedsSoonDuration = time.Minute * 2
972+
defer func() {
973+
tdb.SucceedsSoonDuration = old
974+
}()
976975
tdb.CheckQueryResultsRetry(
977976
t, schemaChangeWaitQuery(`('succeeded', 'failed')`), [][]string{},
978977
)

0 commit comments

Comments
 (0)