-
Notifications
You must be signed in to change notification settings - Fork 828
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
Convert play-mvc-2.4 groovy to java #12271
base: main
Are you sure you want to change the base?
Convert play-mvc-2.4 groovy to java #12271
Conversation
...4Test/java/io/opentelemetry/javaagent/instrumentation/play/v2_4/client/PlayWsClientTest.java
Outdated
Show resolved
Hide resolved
@RegisterExtension | ||
static final InstrumentationExtension testing = HttpClientInstrumentationExtension.forAgent(); | ||
|
||
WSClient wsClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WSClient wsClient; | |
private static WSClient wsClient; |
|
||
@BeforeEach | ||
void setUp() { | ||
wsClient = WS.newClient(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wsClient field uses @AutoCleanup
in the groovy test. you could add
@RegisterExtension
static final AutoCleanupExtension autoCleanup = AutoCleanupExtension.create();
and then
wsClient = WS.newClient(-1); | |
wsClient = WS.newClient(-1); | |
autoCleanup.deferCleanup(wsClient); |
@RegisterExtension | ||
static final InstrumentationExtension testing = HttpClientInstrumentationExtension.forAgent(); | ||
|
||
WSClient wsClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WSClient wsClient; | |
private static WSClient wsClient; |
|
||
@BeforeEach | ||
void setUp() { | ||
wsClient = WS.newClient(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment here around adding the cleanup
part of #7195