You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2019/12/14 23:34:55 UTC

[netbeans] branch master updated: Define jellytools stable tests

This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new f3b122b  Define jellytools stable tests
     new d5580b8  Merge pull request #1754 from blackleg/harness_modules
f3b122b is described below

commit f3b122b215c09b18cb8dd8c88262c8fb40a91c6e
Author: Hector Espert <he...@gmail.com>
AuthorDate: Fri Dec 6 14:30:34 2019 +0100

    Define jellytools stable tests
---
 .travis.yml                                        |  2 +-
 .../nbproject/project.properties                   |  6 +--
 .../src/org/netbeans/jellytools/BundleTest.java    | 57 +++++++++++++++-------
 .../junit/internal/NbModuleLogHandlerTest.java     |  4 +-
 4 files changed, 45 insertions(+), 24 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index d6f734f..d198ffe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -86,7 +86,7 @@ matrix:
             - ant $OPTS -f harness/o.n.insane test
             - ant $OPTS -f harness/apisupport.harness test
             - ant $OPTS -f harness/nbjunit test
-            # - ant $OPTS -f harness/jellytools.platform test
+            - ant $OPTS -f harness/jellytools.platform test -Dtest.config=stable
 
         - name: Test platform modules, Batch 1
           jdk: openjdk8
diff --git a/harness/jellytools.platform/nbproject/project.properties b/harness/jellytools.platform/nbproject/project.properties
index 3e8e218..2f0b580 100644
--- a/harness/jellytools.platform/nbproject/project.properties
+++ b/harness/jellytools.platform/nbproject/project.properties
@@ -20,7 +20,5 @@ javac.compilerargs=-Xlint -Xlint:-serial
 
 test.config.stable.includes=\
 **/BundleTest.class,\
-**/JellytoolsPlatformSuite.class,\
-**/PlatformBundleKeysTest.class,\
-**/WidgetOperatorTest.class
-
+**/WizardOperatorTest.class,\
+**/QuestionDialogOperatorTest.class
diff --git a/harness/jellytools.platform/test/qa-functional/src/org/netbeans/jellytools/BundleTest.java b/harness/jellytools.platform/test/qa-functional/src/org/netbeans/jellytools/BundleTest.java
index 06a55ca..57a52c0 100644
--- a/harness/jellytools.platform/test/qa-functional/src/org/netbeans/jellytools/BundleTest.java
+++ b/harness/jellytools.platform/test/qa-functional/src/org/netbeans/jellytools/BundleTest.java
@@ -25,42 +25,57 @@ import org.netbeans.junit.NbModuleSuite;
 
 /**
  * Test of org.netbeans.jellytools.Bundle
+ *
  * @author Jiri Skrivanek
  */
 public class BundleTest extends JellyTestCase {
 
-    /** Method used for explicit testsuite definition
-     * @return  created suite
+    /**
+     * Method used for explicit testsuite definition
+     *
+     * @return created suite
      */
     public static Test suite() {
-        return NbModuleSuite.create(NbModuleSuite.createConfiguration(BundleTest.class).
-                addTest("testGetBundle",
-                "testGetString",
-                "testGetStringParams",
-                "testGetStringTrimmed",
-                "testGetStringTrimmedParams").gui(false).enableModules(".*").clusters(".*"));
+        return NbModuleSuite.createConfiguration(BundleTest.class)
+                .addTest("testGetBundle",
+                        "testGetString",
+                        "testGetStringParams",
+                        "testGetStringTrimmed",
+                        "testGetStringTrimmedParams")
+                .gui(false)
+                .enableModules(".*")
+                .clusters(".*")
+                .suite();
     }
 
-    /** Redirect output to log files, wait before each test case and
-     * show dialog to test. */
+    /**
+     * Redirect output to log files, wait before each test case and show dialog
+     * to test.
+     */
     @Override
     protected void setUp() {
         System.out.println("### " + getName() + " ###");
     }
 
-    /** Clean up after each test case. */
+    /**
+     * Clean up after each test case.
+     */
     @Override
     protected void tearDown() {
     }
 
-    /** Constructor required by JUnit.
+    /**
+     * Constructor required by JUnit.
+     *
      * @param testName method name to be used as testcase
      */
     public BundleTest(java.lang.String testName) {
         super(testName);
     }
 
-    /** Test of getBundle method. */
+    /**
+     * Test of getBundle method.
+     */
     public void testGetBundle() {
         try {
             ResourceBundle resBundle = Bundle.getBundle("org.netbeans.core.Bundle");
@@ -82,7 +97,9 @@ public class BundleTest extends JellyTestCase {
         }
     }
 
-    /** Test of getString method. Tests also negative cases */
+    /**
+     * Test of getString method. Tests also negative cases
+     */
     public void testGetString() {
         try {
             String value = Bundle.getString("org.netbeans.core.windows.services.Bundle", "OK_OPTION_CAPTION");
@@ -112,7 +129,9 @@ public class BundleTest extends JellyTestCase {
         }
     }
 
-    /** Test of getString method with parameter to format. */
+    /**
+     * Test of getString method with parameter to format.
+     */
     public void testGetStringParams() {
         String pattern = Bundle.getString("org.netbeans.core.windows.view.ui.Bundle", "CTL_FMT_LocalProperties");
         Object[] params = new Object[]{new Integer(1), "AnObject"};
@@ -121,7 +140,9 @@ public class BundleTest extends JellyTestCase {
         assertEquals("Parameters not properly formattted.", expected, value);
     }
 
-    /** Test of getStringTrimmed method. */
+    /**
+     * Test of getStringTrimmed method.
+     */
     public void testGetStringTrimmed() {
         //Saving {0} ...
         String valueRaw = Bundle.getString("org.netbeans.core.Bundle", "CTL_FMT_SavingMessage");
@@ -133,7 +154,9 @@ public class BundleTest extends JellyTestCase {
         assertTrue("Characters '&' should be removed from \"" + valueRaw + "\".", value.indexOf('&') == -1);
     }
 
-    /** Test of getStringTrimmed method with parameter to format. */
+    /**
+     * Test of getStringTrimmed method with parameter to format.
+     */
     public void testGetStringTrimmedParams() {
         String pattern = Bundle.getString("org.netbeans.core.windows.view.ui.Bundle", "CTL_FMT_LocalProperties");
         Object[] params = new Object[]{new Integer(1), "AnOb&ject"};
diff --git a/harness/nbjunit/test/unit/src/org/netbeans/junit/internal/NbModuleLogHandlerTest.java b/harness/nbjunit/test/unit/src/org/netbeans/junit/internal/NbModuleLogHandlerTest.java
index a20a8b1..610cde9 100644
--- a/harness/nbjunit/test/unit/src/org/netbeans/junit/internal/NbModuleLogHandlerTest.java
+++ b/harness/nbjunit/test/unit/src/org/netbeans/junit/internal/NbModuleLogHandlerTest.java
@@ -55,7 +55,7 @@ public class NbModuleLogHandlerTest extends NbTestCase {
                         Exceptions.printStackTrace(ex);
                     }
                     try {
-                        Object _ = new Object[999999];
+                        Object o = new Object[999999];
                     } catch (Throwable t) {
                         Logger.getLogger(NbModuleLogHandlerTest.class.getName()).log(Level.WARNING, null, t);
                     }
@@ -66,7 +66,7 @@ public class NbModuleLogHandlerTest extends NbTestCase {
             assertGC("this will fail", new WeakReference<Object>("interned"));
             throw new IllegalStateException("should not succeed");
         } catch (AssertionFailedError x) {
-            // expected
+            assertNotNull("Expected exception", x);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists