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

Fix test failing with Java 9-ea+146+ #1007

Merged
merged 1 commit into from Mar 24, 2017
Merged

Fix test failing with Java 9-ea+146+ #1007

merged 1 commit into from Mar 24, 2017

Conversation

szpak
Copy link
Member

@szpak szpak commented Mar 24, 2017

Stack trace in JDK part contains also module name:

java.lang.AssertionError: 
Expecting:
 "[MockitoHint] 1. Unused -> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
to match pattern:
 "\[MockitoHint\] 1\. Unused \-\> at [\w\.]+\.reflect\.NativeMethodAccessorImpl\.invoke0\(.*Native Method\)"

The new regexp handles both variants.

Stack trace in JDK part contains also module name
Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

Change seems fine to me. Have not actually run into this issue with JDK 9, but havent run the tests locally for a long time anyways :p

@codecov-io
Copy link

Codecov Report

Merging #1007 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1007      +/-   ##
============================================
- Coverage     86.58%   86.56%   -0.02%     
+ Complexity     2203     2202       -1     
============================================
  Files           286      286              
  Lines          5680     5680              
  Branches        658      658              
============================================
- Hits           4918     4917       -1     
- Misses          568      571       +3     
+ Partials        194      192       -2
Impacted Files Coverage Δ Complexity Δ
...eation/bytebuddy/TypeCachingBytecodeGenerator.java 83.78% <0%> (-1.36%) 8% <0%> (-1%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6e9dc3...7904729. Read the comment docs.

@szpak
Copy link
Member Author

szpak commented Mar 24, 2017

Tested with Java 8 and Java 9-ea+146. Newer Java 9 versions (up to 9-ea+162) throws ExceptionInInitializerError in Gradle.

@szpak szpak merged commit 3b3909f into master Mar 24, 2017
@szpak szpak deleted the tech/fixJava9-ea146 branch March 24, 2017 22:46
@TimvdLippe
Copy link
Contributor

Hm, hopefully known Gradle bug. If anyone can test and verify, that would be nice. Else I will merge this tomorrow :)

@TimvdLippe
Copy link
Contributor

Never mind, merged already 😂

@szpak
Copy link
Member Author

szpak commented Mar 24, 2017

Yup, known bug - gradle/gradle#1095.

@szpak
Copy link
Member Author

szpak commented Mar 24, 2017

Although there seems to be a workaround: gradle/gradle#719 (comment) (just as a reference).

@mockitoguy
Copy link
Member

@szpak, thanks a lot for the fix!!! BTW. do you know if we can set up travis build with java 9?

@szpak
Copy link
Member Author

szpak commented Mar 25, 2017

@szczepiq In fact Mockito master is already built with Java 9. Just not that fresh version to trigger mentioned issue. On the other hand, Gradle is not compatible with more recent Java 9 versions.

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

Successfully merging this pull request may close these issues.

None yet

4 participants