List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:November 26 2007 9:34am
Subject:Rev 301: Removed _really_ long running OutOfConnections test from AllTests in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 301
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Mon 2007-11-26 01:33:29 -0800
message:
  Removed _really_ long running OutOfConnections test from AllTests
  Made the NdbClusterConnection in BaseNdbjTestCase a global singleton, as the underlying
object doesn't really support being deleted and re-used in-process. 
modified:
  java/testsuite/BaseNdbjTestCase.java basejdbc.java-20070517181935-98huwjarzuh25b30-45
  java/testsuite/ndbj/AllTests.java alltests.java-20071126082920-iw0ffw8pv58uorrj-1
=== modified file 'java/testsuite/BaseNdbjTestCase.java'
--- a/java/testsuite/BaseNdbjTestCase.java	2007-11-26 08:55:30 +0000
+++ b/java/testsuite/BaseNdbjTestCase.java	2007-11-26 09:33:29 +0000
@@ -159,10 +159,12 @@
 		System.out.println("Running test: "+this.getClass().getName());
     	try { 
     		//System.out.print("Connecting to cluster...");
-      	  	conn = NdbFactory.createNdbClusterConnection(NDB_MGMD_CONNECTSTRING);
+    		if (conn==null) {
+      	  		conn = NdbFactory.createNdbClusterConnection(NDB_MGMD_CONNECTSTRING);
 
   		    conn.connect(5,3,true);
   		    conn.waitUntilReady(30,0);
+    		}
 		      /**
 		       *  Get a connection to NDB (once / thread)
 		       */
@@ -181,8 +183,10 @@
 			trans.close();
 
 		ndb.close();
-		if (conn != null)
+		/*if (conn != null)
 			conn.close();
+		conn=null; 
+		System.gc(); System.runFinalization();*/
 		super.tearDown();
 	}
 

=== modified file 'java/testsuite/ndbj/AllTests.java'
--- a/java/testsuite/ndbj/AllTests.java	2007-11-26 08:35:15 +0000
+++ b/java/testsuite/ndbj/AllTests.java	2007-11-26 09:33:29 +0000
@@ -17,7 +17,7 @@
 		suite.addTestSuite(OrderedIndexScanTest.class);
 		suite.addTestSuite(NdbTest.class);
 		suite.addTestSuite(NullSetTest.class);
-		suite.addTestSuite(OutOfConnectionProblemTest.class);
+		//suite.addTestSuite(OutOfConnectionProblemTest.class);
 		suite.addTestSuite(NdbScanTest.class);
 		suite.addTestSuite(QuickAsyncTest.class);
 		suite.addTestSuite(BasicTest.class);

Thread
Rev 301: Removed _really_ long running OutOfConnections test from AllTests in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor26 Nov