Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Oct 8, 2025

Unfortunately, #567 was misleading and the integration tests were not actually running, eg this run.

[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

This happened due to 7053471 which accidentally disabled all tests by removing the required Maven lifecycle.

In addition to enabling them, this PR then fixes them; and related issues:

  • integration: Fix and run deploy-war tests with Jetty 9.x (the last Java 8 version). Number of changes needed to get the Rails 7.1 test to actually work.
  • integration: Bumps all the maven plugin versions, tidies the code for other tests
  • specs: Fixes specs with JRuby 9.4.14.0 / JDK 8 which have been failing due to the change in the platform visible to bundler
  • specs: Removes all the old vendored stuff, which is outdated and unused
  • specs: Fixes the spec for running with BUNDLE_DEPLOYMENT
  • specs/integration: Simplifies the bundler locking so we don't need to have versioned matching everywhere, and just runs with the jruby-vendored bundler version.
  • build: Bumps most of the maven plugin versions (except maven-jar-plugin, maven-tools is not compatible with v3)
  • build: Remove a couple of old hacks
  • production: Bumps the default Jetty version to 9.4.58.v20250814. Others are insecure and unpatched.
  • production: Bumps required ruby version to 3.1.0 (JRuby 9.4) since earlier rubyzip upgrade broke 9.3 usage anyway.

CAVEAT / TODO

@chadlwilson chadlwilson force-pushed the tests-without-bundler-hack branch from aa224e5 to ee43f63 Compare October 8, 2025 17:52
@chadlwilson
Copy link
Contributor Author

I had to do the rails db:migrate with CRuby due to the same issue as noted at jruby/activerecord-jdbc-adapter#1146 (comment) - it doesn't seem to cause an issue at runtime though, and I wasn't able to narrow it down.

@headius
Copy link
Member

headius commented Oct 8, 2025

I had to do the rails db:migrate with CRuby

@chadlwilson We could add a placeholder issue here to switch that to JRuby once the arjdbc issue is fixed.

@chadlwilson
Copy link
Contributor Author

I had to do the rails db:migrate with CRuby

@chadlwilson We could add a placeholder issue here to switch that to JRuby once the arjdbc issue is fixed.

Probably not necessary right now, as (for better or worse) I just committed the migrated sqlite DB so it's a no-op on future runs - rather than needing to run special lifecycle within the tests.

The previous code didn't have it doing automatic migrations, and seemed to be using the development env, so I continued with that - except with a 28kB sqlite3 DB in the source tree.

@headius
Copy link
Member

headius commented Oct 8, 2025

@chadlwilson That makes me cringe a bit when I remember us checking in binary files to the JRuby subversion repository many years ago... which is a big reason why the repo is over 300MB now. It's fine for this one case and as long as there's a way to recreate it we can move forward.

@chadlwilson
Copy link
Contributor Author

Yeah, cringe for me also.

I observed that they were committed in the old Rails 4 tests here https://github.com/jruby/warbler/blob/c45992c7577fd60abbf6495ae263f202357497ba/integration/rails4_test/src/main/ruby/db/development.sqlite3 and concluded that was "the way".

At now we have git partial clones and --filter=blob:none to save us from our folly :-)

@chadlwilson
Copy link
Contributor Author

Hello @tillsc 👋- since you did most of the grunt work on the integration tests, I'd really appreciate your input on this follow-up to your work.

I think this will help us find a way forward on #564 and all the related bundler issues, since it gives us a clear baseline with failing integration tests demonstrating the issue in a real (jetty) environment.

[INFO] --- System
[INFO] jruby 9.4.14.0 (3.1.7) 2025-08-28 ddda6d5992 OpenJDK 64-Bit Server VM 25.462-b08 on 1.8.0_462-b08 +jit [x86_64-linux]
[INFO] Time: 2025-10-08 17:57:36 +0000
[INFO] Server: jetty/9.4.58.v20250814
[INFO] jruby.home: uri:classloader://META-INF/jruby.home
[INFO] 
[INFO] --- Context Init Parameters:
[INFO] jruby.max.runtimes = 1
[INFO] jruby.min.runtimes = 1
[INFO] public.root = /
[INFO] rails.env = development
[INFO] 
[INFO] --- Backtrace
[INFO] Bundler::GemNotFound: Could not find rails-7.1.5.2, rack-2.2.19, activerecord-jdbcsqlite3-adapter-71.0-java, actioncable-7.1.5.2, actionmailbox-7.1.5.2, actionmailer-7.1.5.2, actionpack-7.1.5.2, actiontext-7.1.5.2, actionview-7.1.5.2, activejob-7.1.5.2, activemodel-7.1.5.2, activerecord-7.1.5.2, activestorage-7.1.5.2, activesupport-7.1.5.2, railties-7.1.5.2, activerecord-jdbc-adapter-71.0-java, jdbc-sqlite3-3.46.1.1, nio4r-2.7.4-java, websocket-driver-0.8.0-java, zeitwerk-2.6.18, mail-2.8.1, net-imap-0.5.12, net-pop-0.1.2, net-smtp-0.5.1, rails-dom-testing-2.3.0, nokogiri-1.18.10-java, racc-1.8.1-java, rack-session-1.0.2, rack-test-2.2.0, rails-html-sanitizer-1.6.2, globalid-1.3.0, builder-3.3.0, erubi-1.13.1, timeout-0.4.3, marcel-1.1.0, base64-0.3.0, benchmark-0.4.1, bigdecimal-3.3.0-java, concurrent-ruby-1.3.5, connection_pool-2.5.4, drb-2.2.3, i18n-1.14.7, logger-1.7.0, minitest-5.26.0, mutex_m-0.3.0, securerandom-0.4.1, tzinfo-2.0.6, irb-1.15.2, rackup-1.0.1, rake-13.3.0, thor-1.4.0, websocket-extensions-0.1.5, mini_mime-1.1.5, date-3.4.1-java, net-protocol-0.2.2, loofah-2.24.1, pp-0.6.3, rdoc-6.15.0, reline-0.6.2, webrick-1.9.1, crass-1.0.6, prettyprint-0.2.0, erb-4.0.4-java, psych-5.2.6-java, tsort-0.2.0, io-console-0.8.1-java, cgi-0.5.0-java, jar-dependencies-0.5.5 in locally installed gems
[INFO]        materialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:676
[INFO]              specs at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:232
[INFO]          specs_for at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:299
[INFO]              setup at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/runtime.rb:18
[INFO]              setup at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:167
[INFO]             <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/setup.rb:32
[INFO]         with_level at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/ui/shell.rb:173
[INFO]            silence at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/ui/shell.rb:119
[INFO]             <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/setup.rb:32
[INFO]            require at org/jruby/RubyKernel.java:1187
[INFO]            require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:136
[INFO]             <main> at /home/runner/work/warbler/warbler/integration/rails7_test/target/tmp/webapp/WEB-INF/config/boot.rb:3
[INFO]            require at org/jruby/RubyKernel.java:1187
[INFO]            require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:136
[INFO]   load_environment at uri:classloader:/jruby/rack/rails/environment.rb:23
[INFO]   load_environment at uri:classloader:/jruby/rack/rails_booter.rb:73
[INFO]             <main> at <script>:1
[INFO] 

I'm not 100% sure at the merits of removing the bundler.version variations from the testing. Although I think before it was essentially overriding the "system" bundler version and using that everywhere, there might be some merit to validating that things still work when, say, jruby bundler version is 2.6.3 and the version implied by BUNDLED WITH in a project's Gemfile.lock is, say, 2.7.1 - as normally that'd imply a bundler reload at runtime. I am not sure, however, if jruby, jruby-rack or warbler are geared for that.

@chadlwilson chadlwilson force-pushed the tests-without-bundler-hack branch 2 times, most recently from e5173a6 to 2d2bb19 Compare October 11, 2025 09:40
@headius headius added this to the 2.1.0 milestone Oct 11, 2025
@chadlwilson chadlwilson force-pushed the tests-without-bundler-hack branch from ca58c52 to a938153 Compare October 11, 2025 23:42
@chadlwilson chadlwilson merged commit e6d30fd into jruby:master Oct 12, 2025
6 checks passed
@chadlwilson chadlwilson deleted the tests-without-bundler-hack branch October 12, 2025 05:46
@chadlwilson chadlwilson mentioned this pull request Oct 12, 2025
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