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

enable some important sounding java tests #5107

Merged
merged 1 commit into from
Dec 18, 2022

Conversation

mbien
Copy link
Member

@mbien mbien commented Dec 13, 2022

  • java/maven.hints (build tools job)
  • java.lexer (always on since fast)
  • spi.java.hints (Java label)
  • refactoring.java (Java label)
  • form (Java label)
  • junit (always on)
  • javadoc (JavaDoc label)

this required to disable some tests in java.lexer, javadoc and a single test case in spi.java.hints. Everything else worked fine when run directly from the IDE with JDK 19. Lets see what CI says.

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Maven [ci] enable "build tools" tests CI Continuous Integration tests labels Dec 13, 2022
java/java.lexer/nbproject/project.properties Outdated Show resolved Hide resolved
Comment on lines +369 to 370
/* TODO: fails
public void testCasePattern() throws Exception {
Copy link
Member Author

@mbien mbien Dec 13, 2022

Choose a reason for hiding this comment

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

this one failed with:

Testcase: testCasePattern(org.netbeans.modules.java.hints.spiimpl.UtilitiesTest):	FAILED
expected:
<[$expr, $stmts$, $stmts$;, case $expr: foo bar $stmts$;, foo, foo bar ]> 
but was:
<[$expr, $expr, $stmts$, $stmts$;, case $expr: foo bar $stmts$;, foo, foo bar ]>
junit.framework.AssertionFailedError: expected:<[$expr, $stmts$, $stmts$;, case $expr: foo bar $stmts$;, foo, foo bar ]> but was:<[$expr, $expr, $stmts$, $stmts$;, case $expr: foo bar $stmts$;, foo, foo bar ]>
	at org.netbeans.modules.java.hints.spiimpl.UtilitiesTest.assertPositions(UtilitiesTest.java:660)
	at org.netbeans.modules.java.hints.spiimpl.UtilitiesTest.testCasePattern(UtilitiesTest.java:382)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:77)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:476)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:402)
	at java.base/java.lang.Thread.run(Thread.java:1589)

@mbien mbien added the JavaDoc [ci] enable java/javadoc tests and build-javadoc target label Dec 13, 2022
@mbien mbien force-pushed the enable-more-tests branch 2 times, most recently from 5f9367e to 54b2446 Compare December 14, 2022 00:12
@mbien mbien added this to the NB17 milestone Dec 14, 2022
@mbien mbien marked this pull request as ready for review December 14, 2022 16:37
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me. For java.lexer I just think, that one of the tests can be trivially fixed (see inline comment).

java/javadoc/nbproject/project.properties Show resolved Hide resolved
java/java.lexer/nbproject/project.properties Outdated Show resolved Hide resolved
 - java/maven.hints
 - java.lexer
 - spi.java.hints
 - refactoring.java
 - form
 - javadoc
 - junit

some tests needed to be excluded due to failures or missing test data.

PR review showed that JavaTokenDumpTest can be repaired by adding a
look-ahead to the string literal test data.
@mbien mbien merged commit 9ae371e into apache:master Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target Maven [ci] enable "build tools" tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants