Skip to content

Rails 6: Coerce ReloadModelsTest test on Windows #812

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

Merged

Conversation

aidanharan
Copy link
Contributor

@aidanharan aidanharan commented May 12, 2020

The ReloadModelsTest#test_has_one_with_reload test fails on Windows because too many arguments are being passed to create the new subprocess (https://github.com/rails/rails/blob/v6.0.3/activesupport/lib/active_support/testing/isolation.rb#L93).

On the AppVeyor CI, when all tests are being run the test is calling IO.popen with 442 arguments (see https://ci.appveyor.com/project/wpolicarpo/activerecord-sqlserver-adapter/builds/32821521/job/e47ljgrcbpmmiuyf). Because of the number of arguments or the total length of the arguments a Arg list too long - C:/Ruby25-x64/bin/ruby.exe (Errno::E2BIG) exception is being thrown.

Variable Number of arguments
load_path_args 166
$0 1
ORIG_ARGV 274
test_opts 1

If just the ReloadModelsTest#test_has_one_with_reload is run then the number of arguments in ORIG_ARGV is reduced to 2 and the test passes. See https://ci.appveyor.com/project/wpolicarpo/activerecord-sqlserver-adapter/builds/32821146/job/nr3abuyi476eu0s7

Coercing the ReloadModelsTest#test_has_one_with_reload test if being run on a Windows environment.

@aidanharan aidanharan marked this pull request as ready for review May 12, 2020 15:56
@wpolicarpo wpolicarpo merged commit 11b8cdd into rails-sqlserver:master May 12, 2020
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