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

Convert play-mvc-2.4 groovy to java #12271

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

heyams
Copy link
Contributor

@heyams heyams commented Sep 17, 2024

part of #7195

@heyams heyams marked this pull request as ready for review September 19, 2024 22:14
@heyams heyams requested a review from a team as a code owner September 19, 2024 22:14
@RegisterExtension
static final InstrumentationExtension testing = HttpClientInstrumentationExtension.forAgent();

WSClient wsClient;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
WSClient wsClient;
private static WSClient wsClient;


@BeforeEach
void setUp() {
wsClient = WS.newClient(-1);
Copy link
Member

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

Suggested change
wsClient = WS.newClient(-1);
wsClient = WS.newClient(-1);
autoCleanup.deferCleanup(wsClient);

@RegisterExtension
static final InstrumentationExtension testing = HttpClientInstrumentationExtension.forAgent();

WSClient wsClient;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
WSClient wsClient;
private static WSClient wsClient;


@BeforeEach
void setUp() {
wsClient = WS.newClient(-1);
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants