Skip to content

Commit 1ec024e

Browse files
committed
fix(ci): Remove retrying logic
Tests that should fail would instead corrupt the database state, causing subsequent tests to fail. This is of course related to the unfortunate way we disable referential integrity. If we see tests failing again with `InvalidForeignKey` errors, it will be a good time to reopen [cockroach#71496] [cockroach#71496]: cockroachdb/cockroach#71496
1 parent d97cd63 commit 1ec024e

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

test/cases/helper_cockroachdb.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,32 +99,8 @@ def time_it
9999
end
100100
end
101101

102-
# Retry tests that fail due to foreign keys not always being removed synchronously
103-
# in disable_referential_integrity, which causes foreign key errors during
104-
# fixutre creation.
105-
#
106-
# Can be removed once cockroachdb/cockroach#71496 is resolved.
107-
module TestRetryHelper
108-
def run_one_method(klass, method_name, reporter)
109-
reporter.prerecord(klass, method_name)
110-
final_res = nil
111-
2.times do
112-
res = Minitest.run_one_method(klass, method_name)
113-
final_res ||= res
114-
115-
retryable = res.error? && res.failures.any? { _1.message.include?("ActiveRecord::InvalidForeignKey") }
116-
(final_res = res) && break unless retryable
117-
118-
end
119-
120-
# report message from first failure or from success
121-
reporter.record(final_res)
122-
end
123-
end
124-
125102
module ActiveSupport
126103
class TestCase
127-
extend TestRetryHelper
128104
include TestTimeoutHelper
129105

130106
def postgis_version

0 commit comments

Comments
 (0)