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

Assume so test is reported is as skipped rather than passed on JDK 13+ #346

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Dec 4, 2024

No description provided.

@elharo elharo requested a review from michael-o December 4, 2024 10:46
@elharo
Copy link
Contributor Author

elharo commented Dec 5, 2024

The CI seems to be treating AssumptionViolatedException as a failure:

org.junit.AssumptionViolatedException: got: <false>, expected: is <true>
	at org.junit.Assume.assumeThat(Assume.java:106)
	at org.junit.Assume.assumeTrue(Assume.java:50)
	at org.apache.maven.plugins.javadoc.JavadocReportTest.testDoclets(JavadocReportTest.java:480)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

@pzygielo
Copy link
Contributor

pzygielo commented Dec 5, 2024

The CI seems to be treating AssumptionViolatedException as a failure:

Not only CI, I'm getting the same locally. Don't you?

Next part of stacktrace (skipped above) gives clue:

...
	at junit.framework.TestCase.runTest(TestCase.java:177)
	at junit.framework.TestCase.runBare(TestCase.java:142)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:130)
	at junit.framework.TestSuite.runTest(TestSuite.java:241)
	at junit.framework.TestSuite.run(TestSuite.java:236)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)

Just guessing that it is related to AbstractMojoTestCase being junit.framework.TestCase (JUnit3). I'm unsure if assumptions were ported to JUnit 3.

@elharo
Copy link
Contributor Author

elharo commented Dec 5, 2024

No, I don't. I see it skip locally.

@pzygielo
Copy link
Contributor

pzygielo commented Dec 5, 2024

No, I don't. I see it skip locally.

Do you use maven/surefire to execute this test, or rather some IDE with its runner?

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.

4 participants