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

Explicitly clear type map before run test_only_reload_type_map_once_for_every_unknown_type #29341

Conversation

y-yagi
Copy link
Member

@y-yagi y-yagi commented Jun 3, 2017

Currently, the following test fails.

bin/test -a sqlite3_mem --seed 37473 test/cases/relation_test.rb

This is due to reset connection in test_respond_to_for_non_selected_element postprocessing.
This reset is added with #29332 for test_only_reload_type_map_once_for_every_unknown_type.

Since the above test expects the type map to be empty at the time of test run, I think that it is better to empty the type map before test run.

@rails-bot
Copy link

r? @kaspth

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

@rails-bot
Copy link

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against unlock-minitest. Please double check that you specified the right target!

@matthewd
Copy link
Member

matthewd commented Jun 3, 2017

It looks like test_only_warn_on_first_encounter_of_unknown_oid would want the same thing.

Maybe we should go with reset_connection instead of clearing the type map directly? That seems to be what's previously been making it work (via the earlier tests' ensure), and feels more "hands off".

…for_every_unknown_type`

Currently, the following test fails.

```
bin/test -a sqlite3_mem --seed 37473 test/cases/relation_test.rb
```

This is due to reset connection in `test_respond_to_for_non_selected_element` postprocessing.
This reset is added with rails#29332 for `test_only_reload_type_map_once_for_every_unknown_type`.

Since the above test expects the type map to be empty at the time of
test run, I think that it is better to empty the type map before test run.
@y-yagi y-yagi force-pushed the explicitly_clear_type_map_before_run_test branch from b4fcdcb to cd64345 Compare June 3, 2017 09:28
@y-yagi
Copy link
Member Author

y-yagi commented Jun 3, 2017

That seems to be what's previously been making it work (via the earlier tests' ensure), and feels more "hands off".

It seems reasonable. I updated. Thanks.

@matthewd matthewd merged commit e7e9e07 into rails:unlock-minitest Jun 4, 2017
@y-yagi y-yagi deleted the explicitly_clear_type_map_before_run_test branch June 4, 2017 12:20
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