db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject svn commit: r1132747 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java
Date Mon, 06 Jun 2011 20:20:13 GMT
Author: tiago
Date: Mon Jun  6 20:20:12 2011
New Revision: 1132747

URL: http://svn.apache.org/viewvc?rev=1132747&view=rev
Log:
DERBY-5014 Tests should restore the timeout values to default after they are done running.

Fixed one test that was not restoring the timeout value.

Contributed by Siddharth Srivastava <akssps011@gmail.com>


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java?rev=1132747&r1=1132746&r2=1132747&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java
Mon Jun  6 20:20:12 2011
@@ -38,6 +38,7 @@ import org.apache.derbyTesting.junit.Sec
 import org.apache.derbyTesting.junit.SupportFilesSetup;
 import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
+import org.apache.derbyTesting.junit.DatabasePropertyTestSetup;
 
 /**
 	This tests the sysinfo command
@@ -125,15 +126,19 @@ public class SysinfoTest extends BaseJDB
             suite.addTest(decorateTest());
 
         useProperties = true;
-        Properties props = new Properties();
+        Properties sysprops = new Properties();
         if (!TestConfiguration.loadingFromJars())
-            props.put("sysinfotest.classesdir", findClassDir());
-        props.put("derby.infolog.append","true");
-        props.put("derby.locks.waitTimeout","120");
-        props.put("derby.language.logStatementText","true");
+            sysprops.put("sysinfotest.classesdir", findClassDir());
+        sysprops.put("derby.infolog.append","true");
+        sysprops.put("derby.language.logStatementText","true");
         //#drda property ,test for it in sysinfo output
-        props.put("derby.drda.securityMechanism","USER_ONLY_SECURITY");
-        suite.addTest(new SystemPropertyTestSetup(decorateTest(), props));
+        sysprops.put("derby.drda.securityMechanism","USER_ONLY_SECURITY");
+        Test test = new SystemPropertyTestSetup(decorateTest(), sysprops);
+        Properties prop = new Properties();
+        prop.put("derby.locks.waitTimeout","120");
+        test = new DatabasePropertyTestSetup(test, prop);
+        //suite.addTest(new SystemPropertyTestSetup(decorateTest(), props));
+        suite.addTest(test);
 
         return suite;
     }



Mime
View raw message