Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow test_ignored_columns_not_included_in_SELECT column names case insensitive #31160

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Nov 15, 2017

Summary

Allow test_ignored_columns_not_included_in_SELECT column names case insensitive

i.e. Oracle database identifier is UPPERCASE, unlike other databases.

(byebug) query = Developer.all.to_sql
"SELECT \"DEVELOPERS\".\"ID\", \"DEVELOPERS\".\"NAME\", \"DEVELOPERS\".\"SALARY\", \"DEVELOPERS\".\"FIRM_ID\", \"DEVELOPERS\".\"MENTOR_ID\", \"DEVELOPERS\".\"CREATED_AT\", \"DEVELOPERS\".\"UPDATED_AT\", \"DEVELOPERS\".\"CREATED_ON\", \"DEVELOPERS\".\"UPDATED_ON\" FROM \"DEVELOPERS\""

This pull request addresses the following failure when tested with Oracle enhanced adapter.

$ ARCONN=oracle bin/test test/cases/base_test.rb:1498
Using oracle
Run options: --seed 17490

# Running:

F

Finished in 29.406294s, 0.0340 runs/s, 0.0680 assertions/s.

  1) Failure:
BasicsTest#test_ignored_columns_not_included_in_SELECT [/home/yahonda/git/rails/activerecord/test/cases/base_test.rb:1498]:
Expected false to be truthy.

1 runs, 2 assertions, 1 failures, 0 errors, 0 skips
$

This test has been introduced at #30980

insensitive

i.e. Oracle database identifier is UPPERCASE unlike other databases.

```ruby
(byebug) query = Developer.all.to_sql
"SELECT \"DEVELOPERS\".\"ID\", \"DEVELOPERS\".\"NAME\", \"DEVELOPERS\".\"SALARY\", \"DEVELOPERS\".\"FIRM_ID\", \"DEVELOPERS\".\"MENTOR_ID\", \"DEVELOPERS\".\"CREATED_AT\", \"DEVELOPERS\".\"UPDATED_AT\", \"DEVELOPERS\".\"CREATED_ON\", \"DEVELOPERS\".\"UPDATED_ON\" FROM \"DEVELOPERS\""
```
@rails-bot
Copy link

r? @sgrif

(@rails-bot has picked a reviewer for you, use r? to override)

@rafaelfranca rafaelfranca merged commit ecebb39 into rails:master Nov 15, 2017
@yahonda yahonda deleted the ignored_column_case_insensitive branch November 20, 2017 15:35
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.

None yet

4 participants