Skip to content

Commit 2dbca86

Browse files
committed
refactor: various
- fix geos-config file fetching - refactor for loop into any? - unexclude working tests
1 parent 226f1ed commit 2dbca86

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

bin/start-cockroachdb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919

2020
cockroach start-single-node \
2121
--insecure --store=type=mem,size=0.25 --advertise-addr=localhost \
22-
--spatial-libs="$(geos-config --includes)" \
22+
--spatial-libs="$(geos-config --prefix)/lib" \
2323
--pid-file "$pid_file" \
2424
&> "$log_file" &
2525

test/cases/helper_cockroachdb.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,9 @@ def run_one_method(klass, method_name, reporter)
112112
res = Minitest.run_one_method(klass, method_name)
113113
final_res ||= res
114114

115-
retryable = false
116-
if res.error?
117-
res.failures.each do |f|
118-
retryable = true if f.message.include?("ActiveRecord::InvalidForeignKey")
119-
end
120-
end
115+
retryable = res.error? && res.failures.any? { _1.message.include?("ActiveRecord::InvalidForeignKey") }
121116
(final_res = res) && break unless retryable
117+
122118
end
123119

124120
# report message from first failure or from success
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
exclude :test_reset_empty_table_with_custom_pk, "The test fails because serial primary keys in CockroachDB are created with unique_rowid() where PostgreSQL will create them with a sequence. See https://www.cockroachlabs.com/docs/v19.2/serial.html#modes-of-operation"
2-
exclude :test_truncate_tables, "This is override to prevent an intermittent error. Table fk_test_has_pk has constrain droped and not created back"
3-
exclude :test_truncate_tables_with_query_cache, "This is override to prevent an intermittent error. Table fk_test_has_pk has constrain droped and not created back"

test/excludes/ActiveRecord/PostgresqlConnectionTest.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
exclude :test_default_client_min_messages, "Skipping until we can triage further. See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48"
21
exclude :test_get_and_release_advisory_lock, "Skipping until we can triage further. See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48"
32
exclude :test_reconnection_after_actual_disconnection_with_verify, "Skipping until we can triage further. See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48"
43
exclude :test_reset, "Skipping until we can triage further. See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48"

0 commit comments

Comments
 (0)