[hg] main-silver: Making the tests faster.

  • From: Petr Hejl < >
  • To:
  • Subject: [hg] main-silver: Making the tests faster.
  • Date: Wed, 17 Jul 2013 10:05:37 -0700

changeset c9536ae597b2 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/c9536ae597b2
description:
        Making the tests faster.

diffstat:

 csl.api/nbproject/project.properties                                         
                                   |  2 +-
 csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java     
                                   |  6 ++++++
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsCodeComplationBase.java
              |  6 +++++-
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerArrayTest.java
       |  5 +++++
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223112Test.java
 |  5 +++++
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223602Test.java
 |  5 +++++
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223891Test.java
 |  5 +++++
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerSemiTypes.java
       |  5 +++++
 
javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/navigation/Issue226152Test.java
        |  5 +++++
 9 files changed, 42 insertions(+), 2 deletions(-)

diffs (149 lines):

diff --git a/csl.api/nbproject/project.properties 
b/csl.api/nbproject/project.properties
--- a/csl.api/nbproject/project.properties
+++ b/csl.api/nbproject/project.properties
@@ -40,7 +40,7 @@
 # Version 2 license, then the option applies only if the new code is
 # made subject to such option by the copyright holder.
 
-spec.version.base=2.40.0
+spec.version.base=2.41.0
 is.autoload=true
 javac.source=1.6
 
diff --git 
a/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java 
b/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
--- a/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
+++ b/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
@@ -226,7 +226,9 @@
     protected void setUp() throws Exception {
         super.setUp();
 
+        if (cleanCacheDir()) {
         clearWorkDir();
+        }
         System.setProperty("netbeans.user", getWorkDirPath());
         // XXX are the following four lines actually necessary?
         final FileObject wd = FileUtil.toFileObject(getWorkDir());
@@ -4406,6 +4408,10 @@
         return null;
     }
 
+    protected boolean cleanCacheDir() {
+        return true;
+    }
+
     private class TestClassPathProvider implements ClassPathProvider {
         public TestClassPathProvider() {
 
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsCodeComplationBase.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsCodeComplationBase.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsCodeComplationBase.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsCodeComplationBase.java
@@ -68,7 +68,6 @@
 import org.netbeans.modules.parsing.api.UserTask;
 import org.netbeans.modules.parsing.spi.ParseException;
 import org.netbeans.modules.parsing.spi.Parser;
-import org.netbeans.spi.java.classpath.ClassPathProvider;
 import org.openide.modules.InstalledFileLocator;
 import org.openide.util.test.MockLookup;
 
@@ -97,6 +96,11 @@
         OpenProjects.getDefault().getOpenProjects();
     }
 
+    @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
     public static final class IFL extends InstalledFileLocator {
 
         @Override
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerArrayTest.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerArrayTest.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerArrayTest.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerArrayTest.java
@@ -82,6 +82,11 @@
     }
     
     @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
+    @Override
     protected Map<String, ClassPath> createClassPathsForTest() {
         List<FileObject> cpRoots = new 
LinkedList<FileObject>(ClasspathProviderImplAccessor.getJsStubs());
         
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223112Test.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223112Test.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223112Test.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223112Test.java
@@ -74,6 +74,11 @@
     }
     
     @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
+    @Override
     protected Map<String, ClassPath> createClassPathsForTest() {
         List<FileObject> cpRoots = new 
LinkedList<FileObject>(ClasspathProviderImplAccessor.getJsStubs());
         
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223602Test.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223602Test.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223602Test.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223602Test.java
@@ -74,6 +74,11 @@
     }
     
     @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
+    @Override
     protected Map<String, ClassPath> createClassPathsForTest() {
         List<FileObject> cpRoots = new 
LinkedList<FileObject>(ClasspathProviderImplAccessor.getJsStubs());
         
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223891Test.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223891Test.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223891Test.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerIssue223891Test.java
@@ -74,6 +74,11 @@
     }
     
     @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
+    @Override
     protected Map<String, ClassPath> createClassPathsForTest() {
         List<FileObject> cpRoots = new 
LinkedList<FileObject>(ClasspathProviderImplAccessor.getJsStubs());
         
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerSemiTypes.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerSemiTypes.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerSemiTypes.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/JsStructureScannerSemiTypes.java
@@ -74,6 +74,11 @@
     }
     
     @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
+    @Override
     protected Map<String, ClassPath> createClassPathsForTest() {
         List<FileObject> cpRoots = new 
LinkedList<FileObject>(ClasspathProviderImplAccessor.getJsStubs());
         
diff --git 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/navigation/Issue226152Test.java
 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/navigation/Issue226152Test.java
--- 
a/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/navigation/Issue226152Test.java
+++ 
b/javascript2.editor/test/unit/src/org/netbeans/modules/javascript2/editor/navigation/Issue226152Test.java
@@ -77,6 +77,11 @@
     }
     
     @Override
+    protected boolean cleanCacheDir() {
+        return false;
+    }
+
+    @Override
     protected Map<String, ClassPath> createClassPathsForTest() {
         List<FileObject> cpRoots = new 
LinkedList<FileObject>(ClasspathProviderImplAccessor.getJsStubs());
         

[hg] main-silver: Making the tests faster.

Petr Hejl 07/17/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close