You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At least the latest 2 (v9.4.4.0 and v9.4.3.0) JRuby releases are seeing failures when running through our JRuby specific GitHub Actions CI tests.
We are currently operating under the understanding that these issues:
Only impact CI behavior, not real world agent usage
Only take place with GitHub Actions run, and are difficult to reproduce with JRuby on a local workstation
Hypothesis: the issues seem to be caused by the tests' use of a Ruby global, $collector, to serve as a fake collector object (one that can't really send collected data up to New Relic's servers). With JRuby, $collector.calls_for('subject') occasionally return 2 calls instead of 1. If we relax the "exactly 1 should be seen" assertion to "at least 1 should be seen" and operate on the first call seen, everything works.
We could put this method into a test helper and refactor all $collector.calls_for calls in every test:
# instead ofcalls= $collector.calls_for(subject)assert_equal(1,calls.size)# use the helpercall=first_call_for(subject)deffirst_call_for(subject)items= $collector.calls_for(subject)ifdefined?(JRUBY_VERSION)refute_predicateitems.size,:zero?elseassert_equal(1,items.size)enditems.firstend
We could also troubleshoot why there is more than 1 call seen. But unfortunately the fact that this behavior is not reproducible locally and sporadic in where it appears in GitHub Actions, it's a tough one to narrow down.
The text was updated successfully, but these errors were encountered:
At least the latest 2 (v9.4.4.0 and v9.4.3.0) JRuby releases are seeing failures when running through our JRuby specific GitHub Actions CI tests.
We are currently operating under the understanding that these issues:
Hypothesis: the issues seem to be caused by the tests' use of a Ruby global,
$collector
, to serve as a fake collector object (one that can't really send collected data up to New Relic's servers). With JRuby,$collector.calls_for('subject')
occasionally return 2 calls instead of 1. If we relax the "exactly 1 should be seen" assertion to "at least 1 should be seen" and operate on the first call seen, everything works.We could put this method into a test helper and refactor all
$collector.calls_for
calls in every test:We could also troubleshoot why there is more than 1 call seen. But unfortunately the fact that this behavior is not reproducible locally and sporadic in where it appears in GitHub Actions, it's a tough one to narrow down.
The text was updated successfully, but these errors were encountered: