List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:September 13 2007 10:09pm
Subject:Rev 149: Fixed OI test case to use asserts instead of System.out.println in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------
revno: 149
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Thu 2007-09-13 15:09:24 -0700
message:
  Fixed OI test case to use asserts instead of System.out.println
modified:
  java/testsuite/BaseNdbjTestCase.java basejdbc.java-20070517181935-98huwjarzuh25b30-45
  java/testsuite/ndbj/OrderedIndexScanTest.java
orderedindexscantest-20070913200612-yxpzo7ji93xk863r-1
=== modified file 'java/testsuite/BaseNdbjTestCase.java'
--- a/java/testsuite/BaseNdbjTestCase.java	2007-09-13 21:28:09 +0000
+++ b/java/testsuite/BaseNdbjTestCase.java	2007-09-13 22:09:24 +0000
@@ -10,7 +10,7 @@
 import com.mysql.cluster.ndbj.NdbClusterConnection;
 import com.mysql.cluster.ndbj.NdbFactory;
 import com.mysql.cluster.ndbj.NdbTransaction;
-import com.mysql.cluster.ndbj.ndbapi;
+import com.mysql.cluster.ndbj.ndbj;
 
 
 public class BaseNdbjTestCase extends testsuite.BaseTestCase {
@@ -32,7 +32,7 @@
 	
 	static { 
   	    System.loadLibrary("ndbj");
-    	ndbapi.ndb_init();
+    	ndbj.ndb_init();
 	}
 
 	public BaseNdbjTestCase(String arg0) {

=== modified file 'java/testsuite/ndbj/OrderedIndexScanTest.java'
--- a/java/testsuite/ndbj/OrderedIndexScanTest.java	2007-09-13 21:28:09 +0000
+++ b/java/testsuite/ndbj/OrderedIndexScanTest.java	2007-09-13 22:09:24 +0000
@@ -66,7 +66,8 @@
 			/*   
 			    iop.equal(0,1);
 			 */  
-			System.out.println(NdbIndexScanOperation.BoundType.BoundEQ);
+			assertEquals(NdbIndexScanOperation.BoundType.BoundEQ.type,4);
+			
 			iop.setBound(0, 
 					NdbIndexScanOperation.BoundType.BoundEQ,
 					1);
@@ -85,10 +86,15 @@
 
 
 
+			int count=1;
 			while(rs.next())
 			{
-				System.out.println("a=" + rs.getInt("a") + 
-						" b=" + rs.getInt("b"));
+				int a = rs.getInt("a");
+				int b = rs.getInt("b");
+				assertEquals(a,1);
+				assertEquals(b,count);
+				
+				count++;
 			}
 
 

Thread
Rev 149: Fixed OI test case to use asserts instead of System.out.println in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmergeMonty Taylor14 Sep