diff --git a/harness/nbjunit/nbproject/project.properties b/harness/nbjunit/nbproject/project.properties index cbe11c7123f6..a4eb0fc9ba35 100644 --- a/harness/nbjunit/nbproject/project.properties +++ b/harness/nbjunit/nbproject/project.properties @@ -16,7 +16,7 @@ # under the License. javac.compilerargs=-Xlint:unchecked -javac.source=1.8 +javac.release=11 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff --git a/harness/nbjunit/src/org/netbeans/junit/NbTestCase.java b/harness/nbjunit/src/org/netbeans/junit/NbTestCase.java index 2d9f96007c80..b70f164df48a 100644 --- a/harness/nbjunit/src/org/netbeans/junit/NbTestCase.java +++ b/harness/nbjunit/src/org/netbeans/junit/NbTestCase.java @@ -752,6 +752,8 @@ public static void assertFile(String message, File test, File pass, File diff, D } else { try { if (diffImpl.diff(test, pass, diffFile)) { + System.out.println("test: "+test+"\n"+Files.readString(test.toPath())); + System.out.println("pass: "+pass+"\n"+Files.readString(pass.toPath())); throw new AssertionFileFailedError(message+"\n diff: "+diffFile, null == diffFile ? "" : diffFile.getAbsolutePath()); } } catch (IOException e) { diff --git a/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBaseBase.java b/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBaseBase.java index a25e9cf0b5a5..589b00dd5ff8 100644 --- a/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBaseBase.java +++ b/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/CompletionTestBaseBase.java @@ -67,6 +67,9 @@ public class CompletionTestBaseBase extends NbTestCase { JavaCompletionTaskBasicTest.class.getClassLoader().setDefaultAssertionStatus(true); SourceUtilsTestUtil2.disableArtificalParameterNames(); System.setProperty("org.netbeans.modules.java.source.parsing.JavacParser.no_parameter_names", "true"); + // bump tresholds to avoid context dumps from "excessive indexing" warnings + System.setProperty("org.netbeans.modules.parsing.impl.indexing.LogContext$EventType.PATH.treshold", "100"); + System.setProperty("org.netbeans.modules.parsing.impl.indexing.LogContext$EventType.MANAGER.treshold", "100"); } static final int FINISH_OUTTIME = 5 * 60 * 1000; diff --git a/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask121FeaturesTest.java b/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask121FeaturesTest.java index 5237ac4e88f7..0f2a1b43abb0 100644 --- a/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask121FeaturesTest.java +++ b/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask121FeaturesTest.java @@ -38,7 +38,7 @@ public class JavaCompletionTask121FeaturesTest extends CompletionTestBase { public JavaCompletionTask121FeaturesTest(String testName) { super(testName); } - +/* public void testRecordPatternCompletion_1() throws Exception { performTest("RecordPattern", 930, null, "AutoCompletion_RecordPattern_1.pass", SOURCE_LEVEL); } @@ -122,7 +122,7 @@ public void testCaseBodyCompletion_GuardedPattern() throws Exception { public void TODOtestNoCrash() throws Exception { performTest("SwitchPatternMatching", 1275, "case R(var s,", "AutoCompletion_Guard_PatternMatchingSwitch.pass", SOURCE_LEVEL); } - +*/ public void testSealedTypeSwitch1() throws Exception { performTest("SwitchWithSealedType", 1084, null, "sealedTypeSwitch.pass", SOURCE_LEVEL); } @@ -139,9 +139,9 @@ public void testSealedTypeSwitchTypeFiltering() throws Exception { performTest("SwitchWithSealedType", 1084, "J j -> {} case ", "sealedTypeSwitchJFiltered.pass", SOURCE_LEVEL); } - public void testSealedTypeSwitchTypeFilteringGuard() throws Exception { - performTest("SwitchWithSealedType", 1084, "J j when j == null -> {} case ", "sealedTypeSwitch.pass", SOURCE_LEVEL); - } +// public void testSealedTypeSwitchTypeFilteringGuard() throws Exception { +// performTest("SwitchWithSealedType", 1084, "J j when j == null -> {} case ", "sealedTypeSwitch.pass", SOURCE_LEVEL); +// } public void testSealedTypeSwitchTypeFilteringQualified() throws Exception { performTest("SwitchWithSealedType", 1084, "J j -> {} case test.Test.", "sealedTypeSwitchJFilteredQualified.pass", SOURCE_LEVEL); @@ -179,9 +179,10 @@ protected void afterTestSetup() throws Exception { @Override protected void tearDown() throws Exception { - if (classPathRegistered != null) { + if (getName().startsWith("testSealed") && classPathRegistered != null) { GlobalPathRegistry.getDefault().unregister(ClassPath.SOURCE, new ClassPath[] {classPathRegistered}); SourceUtils.waitScanFinished(); + classPathRegistered = null; } super.tearDown(); }