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

Add integration test to help prevent JSON loading regressions [changelog skip] #2436

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/config/prune_bundler_print_json_defined.rb
@@ -0,0 +1,4 @@
prune_bundler true
before_fork do
puts "defined?(JSON): #{defined?(JSON).inspect}"
end
7 changes: 7 additions & 0 deletions test/test_integration_cluster.rb
Expand Up @@ -261,6 +261,13 @@ def test_load_path_does_not_include_nio4r
end
end

def test_json_gem_not_required_in_master_process
cli_server "-w #{workers} -C test/config/prune_bundler_print_json_defined.rb test/rackup/hello.ru"

line = @server.gets
assert_match(/defined\?\(JSON\): nil/, line)
end

private

def worker_timeout(timeout, iterations, config)
Expand Down