Skip to content

Commit

Permalink
changefeedccl: Deflake TestChangefeedSchemaTTL/webhook
Browse files Browse the repository at this point in the history
Deflake and re-enable TestChangefeedSchemaTTL/webhook
Fixes cockroachdb#66991

Release Notes: None
  • Loading branch information
Yevgeniy Miretskiy committed Dec 20, 2021
1 parent 131291b commit 50e379e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions pkg/ccl/changefeedccl/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2793,24 +2793,25 @@ func TestChangefeedSchemaTTL(t *testing.T) {
resume <- struct{}{}

// Verify that the third call to Next() returns an error (the first is the
// initial row, the second is the first change. The third should detect the
// GC interval mismatch).
_, _ = dataExpiredRows.Next()
_, _ = dataExpiredRows.Next()
if _, err := dataExpiredRows.Next(); !testutils.IsError(err, `GC threshold`) {
t.Errorf(`expected "GC threshold" error got: %+v`, err)
// initial row, the second is the first change.
// Note: rows, and the error message may arrive in any order, so we just loop
// until we see an error.
for {
_, err := dataExpiredRows.Next()
if err != nil {
require.Regexp(t, `GC threshold`, err)
break
}
}

}
// TODO(ssd): tenant tests skipped because of f.Server() use
// in forceTableGC
t.Run("sinkless", sinklessTest(testFn, feedTestNoTenants))
t.Run("enterprise", enterpriseTest(testFn, feedTestNoTenants))
t.Run("cloudstorage", cloudStorageTest(testFn, feedTestNoTenants))
t.Run("kafka", kafkaTest(testFn, feedTestNoTenants))
t.Run(`webhook`, func(t *testing.T) {
skip.WithIssue(t, 66991, "flaky test")
webhookTest(testFn, feedTestNoTenants)(t)
})
t.Run(`webhook`, webhookTest(testFn, feedTestNoTenants))
}

func TestChangefeedErrors(t *testing.T) {
Expand Down

0 comments on commit 50e379e

Please sign in to comment.