Skip to content

Make AgentTestRunner compatible with bootstrap classes - #262

Merged
realark merged 8 commits into
masterfrom
ark/akka
Mar 19, 2018
Merged

realark merged 8 commits into
masterfrom
ark/akka

Conversation

@realark

@realark realark commented Mar 15, 2018 •

Copy link
Copy Markdown
Contributor
  • Restrict Agent and Bootstrap package names to specific package prefixes
  • Put agent-bootstrap and opentracing on test runner bootstrap to allow testing bootstrap instrumentation.

I wanted to go one step further and refuse to load core agent classes under the AgentTestRunner, but found that many tests were using agent classes. The option is still open for us to do this, but it will require updating some of the tests.

@realark realark added the tag: do not merge Do not merge changes label Mar 15, 2018
@realark
realark force-pushed the ark/akka branch 6 times, most recently from 59960b4 to 493bb79 Compare March 15, 2018 19:59
@realark
realark force-pushed the ark/akka branch 3 times, most recently from c61e1a9 to 8360ed4 Compare March 15, 2018 23:29
@realark realark added type: feature Enhancements and improvements dev/tooling and removed tag: do not merge Do not merge changes labels Mar 16, 2018
@realark
realark requested a review from tylerbenson March 16, 2018 00:05

@tylerbenson tylerbenson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Doesn't seem like this broke any tests in the process... I was expecting this to uncover some instrumentation that wasn't injecting everything it needed.

public class Utils {
/* packages which will be loaded on the bootstrap classloader*/
public static final String[] BOOTSTRAP_PACKAGE_PREFIXES = {
"io.opentracing",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this will be remapped according to the shadow jar rules, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io.opentracing isn't renamed by our shadow rules. It goes as-is on the bootstrap because we need to pick up OT api calls from the user's code. Everything else is renamed.

import spock.lang.Specification
import spock.lang.Unroll

class ConfigurableInstrumenterTest extends Specification {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did these tests get moved somewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were dead tests in the tooling project. Turns out ConfigurableInstrumenterTest never was moved into agent-tooling back when I renamed the project, so I just brought it back. The other tests are already in agent-tooling.

@tylerbenson

Copy link
Copy Markdown
Contributor

LGTM!

@realark
realark merged commit 4b852d7 into master Mar 19, 2018
@realark
realark deleted the ark/akka branch March 19, 2018 22:46
@tylerbenson tylerbenson added this to the 0.6.0 milestone Mar 29, 2018
@PerfectSlayer PerfectSlayer added comp: tooling Build & Tooling and removed dev/tooling labels Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants