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

CI: Rework JRuby testing #2282

Merged
merged 34 commits into from
Nov 27, 2023
Merged

CI: Rework JRuby testing #2282

merged 34 commits into from
Nov 27, 2023

Conversation

fallwith
Copy link
Contributor

@fallwith fallwith commented Oct 23, 2023

  • Upgrade to JRuby v9.4.5.0
  • Remove all "services" from the JRuby workflow (databases, memory stores, etc.)
  • Stop using JRuby --debug
  • Rename unit_tests to jruby_unit_tests to match the jruby_multiverse name
  • Replace calls to our scripts/retry_command with the use of nick-fields/retry
  • Define 2 JRuby specific add-opens Java opts and specify Xmx and Xms values
  • Stop testing Rails v6.0 (but continue testing v6.1)
  • Switch away from running groups of multiverse suites to running individual suites
  • Stop testing all suites known to require a service or be problematic with JRuby
  • Introduce a dup for config hash resetting, as JRuby correctly points to it as having a potential race condition without the dup
  • Define a first_call_for test helper that permits JRuby to have more than 1 call recorded while still examining the first call
  • Skip JRuby for the async-http suite as it requires native C extensions

JRuby CI run: https://github.com/newrelic/newrelic-ruby-agent/actions/runs/6964342780

use the latest stable JRuby for JRuby tests
For the `async_http` multiverse suite:

- ignore JRuby, as it can not work with the required native extensions
- ignore expected errors instead of having them hit STDOUT
for JRuby, allow multiple seen errors
for JRuby permit the odd extra event
relax assertions for JRuby, while still verifying the same object in the
same way as CRuby
standardize on relaxing JRuby assertions for all collector calls
update `first_call_for` usage
Update the JRuby CI to run the latest version
@fallwith fallwith changed the title CI: test against JRuby v9.4.4.0 CI: test against JRuby ~v9.4.4.0~ v9.4.5.0 Nov 8, 2023
@fallwith fallwith changed the title CI: test against JRuby ~v9.4.4.0~ v9.4.5.0 CI: test against JRuby v9.4.5.0 Nov 8, 2023
Set JAVA_OPTS to explicitly permit JRuby to do the file related
inflection it needs to do with the core Java libs
For some reason the hackish fake collector we use for testing has issues
with JRuby but only when ran via GitHub Actions.

For now at least, relax the 'exactly 1 call made for x' to be 'at least
1 call made for x' when JRuby is in play.
@kford-newrelic kford-newrelic added the estimate Issue needing estimation label Nov 20, 2023
- Have JRuby test with Rails 7
- Use `::` prefix with the `Bloodhound` class
- constant namespacing
- focus on unit tests
JRuby WIP
to address JRuby driven concurrent hash access issues, use dup instead
of a mutex
JRuby CI: re-enable multiverse tests
the unit tests work with retry, so use it for multiverse as well
try running  without retries
combine individual suite running with retry
tweak GHA env vars
image, JAVA_OPTS
restore `--dev` for JRuby
restore 22 for multiverse
during manual testing, let's keep retries off
revert to an older JRuby
stick to the standalone basics
try the latest JRuby again
remove unit test services, misc cleanup
remove failed attempt to address a JRuby / Rails 7.0 test environment
compatibility issue
@fallwith fallwith changed the title CI: test against JRuby v9.4.5.0 CI: Rework JRuby testing Nov 23, 2023
remove the now unused script
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 94.22% 94%
Branch 82.78% 82%

.github/workflows/ci_jruby.yml Show resolved Hide resolved
.github/workflows/ci_jruby.yml Show resolved Hide resolved
test/multiverse/suites/async_http/Envfile Outdated Show resolved Hide resolved
@fallwith fallwith removed the estimate Issue needing estimation label Nov 27, 2023
leverage the existing `suite_condition` pattern for skipping JRuby when
testing a gem with native C extensions
kaylareopelle
kaylareopelle previously approved these changes Nov 27, 2023
tannalynn
tannalynn previously approved these changes Nov 27, 2023
@fallwith fallwith merged commit 43978ef into dev Nov 27, 2023
26 checks passed
@fallwith fallwith deleted the jruby9440 branch November 27, 2023 20:53
@fallwith fallwith mentioned this pull request Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants