[infinispan-commits] Infinispan SVN: r2300 - in branches/4.1.x: core/src/test/java/org/infinispan/invalidation and 1 other directory.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Thu Sep 2 05:49:24 EDT 2010


Author: manik.surtani at jboss.com
Date: 2010-09-02 05:49:23 -0400 (Thu, 02 Sep 2010)
New Revision: 2300

Modified:
   branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableManipulationTest.java
   branches/4.1.x/core/src/test/java/org/infinispan/invalidation/BaseInvalidationTest.java
Log:
Cleaned up tests

Modified: branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableManipulationTest.java
===================================================================
--- branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableManipulationTest.java	2010-09-02 09:41:01 UTC (rev 2299)
+++ branches/4.1.x/cachestore/jdbc/src/test/java/org/infinispan/loaders/jdbc/TableManipulationTest.java	2010-09-02 09:49:23 UTC (rev 2300)
@@ -79,7 +79,6 @@
          assert false : "missing config param, exception expected";
       } catch (CacheLoaderException e) {
          other.setDataColumnType("VARCHAR(255)");
-         assert true : "We do not expect a failure here";
       }
 
       other.createTable(mockConnection);
@@ -90,7 +89,6 @@
          assert false : "missing config param, exception expected";
       } catch (CacheLoaderException e) {
          other.setIdColumnName("abc");
-         assert true : "We do not expect a failure here";
       }
 
       other.createTable(mockConnection);
@@ -101,7 +99,6 @@
          assert false : "missing config param, exception expected";
       } catch (CacheLoaderException e) {
          other.setDataColumnName("abc");
-         assert true : "We do not expect a failure here";
       }
 
       other.createTable(mockConnection);
@@ -112,7 +109,6 @@
          assert false : "missing config param, exception expected";
       } catch (CacheLoaderException e) {
          other.setDataColumnName("abc");
-         assert true : "We do not expect a failure here";
       }
 
       other.createTable(mockConnection);
@@ -123,7 +119,6 @@
          assert false : "missing config param, exception expected";
       } catch (CacheLoaderException e) {
          other.setDataColumnName("timestamp");
-         assert true : "We do not expect a failure here";
       }
 
       other.setTimestampColumnType(null);
@@ -132,7 +127,6 @@
          assert false : "missing config param, exception expected";
       } catch (CacheLoaderException e) {
          other.setIdColumnType("BIGINT");
-         assert true : "We do not expect a failure here";
       }
    }
 

Modified: branches/4.1.x/core/src/test/java/org/infinispan/invalidation/BaseInvalidationTest.java
===================================================================
--- branches/4.1.x/core/src/test/java/org/infinispan/invalidation/BaseInvalidationTest.java	2010-09-02 09:41:01 UTC (rev 2299)
+++ branches/4.1.x/core/src/test/java/org/infinispan/invalidation/BaseInvalidationTest.java	2010-09-02 09:49:23 UTC (rev 2300)
@@ -149,29 +149,18 @@
          replListener(cache2).expect(InvalidateCommand.class);
          mgr1.commit();
          if (isSync) {
-            fail("Ought to have failed!");
+            assert false: "isSync should be false";
          } else {
-            assert true : "Ought to have succeeded";
             replListener(cache2).waitForRpc();
          }
+      } catch (RollbackException roll) {
+         assert isSync : "isSync should be true";
       }
-      catch (RollbackException roll) {
-         if (isSync)
-            assertTrue("Ought to have failed!", true);
-         else
-            fail("Ought to have succeeded!");
-      }
 
       mgr2.resume(tx2);
-      try {
-         replListener(cache1).expect(InvalidateCommand.class);
-         mgr2.commit();
-         if (!isSync) replListener(cache1).waitForRpc();
-         assertTrue("Ought to have succeeded!", true);
-      }
-      catch (RollbackException roll) {
-         fail("Ought to have succeeded!");
-      }
+      replListener(cache1).expect(InvalidateCommand.class);
+      mgr2.commit();
+      if (!isSync) replListener(cache1).waitForRpc();
 
       LockManager lm1 = TestingUtil.extractComponent(cache1, LockManager.class);
       LockManager lm2 = TestingUtil.extractComponent(cache2, LockManager.class);



More information about the infinispan-commits mailing list