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

Having problems with jmockit 1.45 and Junit 5.4 #585

Closed
ramses-gomez opened this issue Feb 15, 2019 · 2 comments
Closed

Having problems with jmockit 1.45 and Junit 5.4 #585

ramses-gomez opened this issue Feb 15, 2019 · 2 comments
Assignees
Labels

Comments

@ramses-gomez
Copy link

@ramses-gomez ramses-gomez commented Feb 15, 2019

I just upgraded to the latest version of jmockit (1.45) and jUnit (5.4.0) and all the sudden all test were failing with a null pointer exception I checked and none of the objects injected by jmockit using annotations @tested, @injected and @Mocked were being created, they were all null hence the null pointer exception I downgraded JUnit back to 5.3..2 and everything was working again.

Any suggestion with this?

@ramses-gomez ramses-gomez changed the title Having problems with jmockit 145 and Junit 5..4 Having problems with jmockit 1.45 and Junit 5..4 Feb 15, 2019
@rliesenfeld rliesenfeld changed the title Having problems with jmockit 1.45 and Junit 5..4 Having problems with jmockit 1.45 and Junit 5.4 Feb 16, 2019
@rliesenfeld rliesenfeld self-assigned this Feb 16, 2019
@sbrannen

This comment has been minimized.

Copy link

@sbrannen sbrannen commented Feb 24, 2019

As I explained in junit-team/junit5#1792 (comment), the JMockitInitialization class does not properly register JMockit's FakeExtensionRegistry which in turn never gets a chance to register the JMockitExtension.

Thus, JMockit's support for JUnit Jupiter simply never gets registered when using JUnit Jupiter 5.4+.

In junit-team/junit5#1792 (comment), I also outlined a workaround that works but is rather intrusive.

@rliesenfeld

This comment has been minimized.

Copy link
Member

@rliesenfeld rliesenfeld commented Feb 25, 2019

It's already fixed...

@rliesenfeld rliesenfeld reopened this Feb 25, 2019
@jmockit jmockit locked and limited conversation to collaborators Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.