Skip to content

Coerce FieldOrderedValuesTest NULL uniqueness failures#1390

Merged
aidanharan merged 1 commit into
mainfrom
copilot/coerce-failing-tests-ci-run
Jun 13, 2026
Merged

Coerce FieldOrderedValuesTest NULL uniqueness failures#1390
aidanharan merged 1 commit into
mainfrom
copilot/coerce-failing-tests-ci-run

Conversation

Copilot AI commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

SQL Server treats NULLs in unique indexes as equal, unlike PostgreSQL/MySQL/SQLite. Three FieldOrderedValuesTest tests insert rows with NULL author_id/name, hitting a duplicate key error on index_books_on_author_id_and_name.

Changes

  • test/cases/coerced_tests.rb — adds coerce wrappers for three tests that were not yet handled:
    • test_in_order_of_with_out_of_bound_integer_does_not_match_nulls
    • test_in_order_of_with_only_unrepresentable_values_does_not_build_empty_case
    • test_in_order_of_with_unknown_enum_key_does_not_match_nulls

Each coercion follows the existing pattern in FieldOrderedValuesTest: drop the unique index before the test, run the original, then restore the index in ensure.

Copilot AI changed the title Coerce FieldOrderedValuesTest tests for SQL Server NULL uniqueness Coerce FieldOrderedValuesTest NULL uniqueness failures Jun 13, 2026
Copilot AI requested a review from aidanharan June 13, 2026 14:02
@aidanharan aidanharan marked this pull request as ready for review June 13, 2026 15:00
@aidanharan aidanharan merged commit 9845cf4 into main Jun 13, 2026
6 checks passed
@aidanharan aidanharan deleted the copilot/coerce-failing-tests-ci-run branch June 13, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants