newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
192 stars 140 forks source link

Simplify test #1874

Closed sdaubin closed 2 weeks ago

sdaubin commented 2 weeks ago

Overview

APISupportabilityTest is unnecessarily complicated. It uses InstrumentTestUtils.createTransformerAndRetransformClass, passing in a string method descriptor, when it can use InstrumentTestUtils.retransformClass instead. Given that many tests are added by copying existing tests, we should clean up this unnecessary pattern.

Related Github Issue

Include a link to the related GitHub issue, if applicable

Testing

The agent includes a suite of tests which should be used to verify your changes don't break existing functionality. These tests will run with Github Actions when a pull request is made. More details on running the tests locally can be found here,

Checks