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

feat: JUnit 5 Support #287

Merged
merged 15 commits into from
Aug 5, 2024
Merged

feat: JUnit 5 Support #287

merged 15 commits into from
Aug 5, 2024

Conversation

ikysil
Copy link
Collaborator

@ikysil ikysil commented Aug 3, 2024

Resolves #103
Replaces #144

@ikysil ikysil added this to the 5.0.0 milestone Aug 3, 2024
@ikysil ikysil self-assigned this Aug 3, 2024
@ikysil ikysil mentioned this pull request Aug 3, 2024
14 tasks
@ikysil ikysil marked this pull request as ready for review August 3, 2024 22:19
@ikysil ikysil mentioned this pull request Aug 3, 2024
@graben
Copy link

graben commented Aug 4, 2024

Hi @ikysil
CdiJUnit5Extension.createTestInstance() seems to need something like

if (testConfiguration == null) {
    beforeAll(extensionContext);
}

to avoid NullPointerException with maven-surefire-plugin

@ikysil
Copy link
Collaborator Author

ikysil commented Aug 4, 2024

Hi @graben

... CdiJUnit5Extension.createTestInstance() seems to need something like

if (testConfiguration == null) {
    beforeAll(extensionContext);
}

to avoid NullPointerException with maven-surefire-plugin

I don't see this happening in neither of the modules.
Would you mind to provide a reproducer?

@graben
Copy link

graben commented Aug 4, 2024

Hi @graben

... CdiJUnit5Extension.createTestInstance() seems to need something like

if (testConfiguration == null) {
    beforeAll(extensionContext);
}

to avoid NullPointerException with maven-surefire-plugin

I don't see this happening in neither of the modules. Would you mind to provide a reproducer?

Sure. test.zip
It seems that the implementing interface for logging is causing surefire to call createTestInstance earlier than expected!?

@ikysil
Copy link
Collaborator Author

ikysil commented Aug 4, 2024

The presence of the @TestInstance(PER_CLASS) annotation changes the order of the extension callbacks.

@graben
Copy link

graben commented Aug 5, 2024

@ikysil: Is an automatic synchronization between @TestInstance and @Isolation planed? It might cause issues if not.

@ikysil
Copy link
Collaborator Author

ikysil commented Aug 5, 2024

Let's have a discussion #290 and then implement whatever is decided.

@ikysil ikysil merged commit f0f47f6 into master Aug 5, 2024
28 checks passed
@ikysil ikysil deleted the feat-support-junit5 branch August 5, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: JUnit 5 Support?
2 participants