Repository: cassandra
Updated Branches:
  refs/heads/trunk f6dff616f -> 7d8092b66


use junit asserts


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7d8092b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7d8092b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7d8092b6

Branch: refs/heads/trunk
Commit: 7d8092b6602d2d92bd3ef215153ff5e686fab106
Parents: f6dff61
Author: Dave Brosius <[email protected]>
Authored: Mon Mar 3 01:18:52 2014 -0500
Committer: Dave Brosius <[email protected]>
Committed: Mon Mar 3 01:18:52 2014 -0500

----------------------------------------------------------------------
 .../apache/cassandra/db/RangeTombstoneTest.java | 25 ++++++++++----------
 1 file changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7d8092b6/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java 
b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index 15ef19a..d240206 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -44,6 +44,7 @@ import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import static org.apache.cassandra.Util.dk;
@@ -99,17 +100,17 @@ public class RangeTombstoneTest extends SchemaLoader
         cf = cfs.getColumnFamily(QueryFilter.getNamesFilter(dk(key), CFNAME, 
columns, System.currentTimeMillis()));
 
         for (int i : live)
-            assert isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " should be 
live";
+            assertTrue("Cell " + i + " should be live", isLive(cf, 
cf.getColumn(b(i))));
         for (int i : dead)
-            assert !isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " shouldn't 
be live";
+            assertTrue("Cell " + i + " shouldn't be live", !isLive(cf, 
cf.getColumn(b(i))));
 
         // Queries by slices
         cf = cfs.getColumnFamily(QueryFilter.getSliceFilter(dk(key), CFNAME, 
b(7), b(30), false, Integer.MAX_VALUE, System.currentTimeMillis()));
 
         for (int i : new int[]{ 7, 8, 9, 11, 13, 15, 17, 28, 29, 30 })
-            assert isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " should be 
live";
+            assertTrue("Cell " + i + " should be live", isLive(cf, 
cf.getColumn(b(i))));
         for (int i : new int[]{ 10, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 
25, 26, 27 })
-            assert !isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " shouldn't 
be live";
+            assertTrue("Cell " + i + " shouldn't be live", !isLive(cf, 
cf.getColumn(b(i))));
     }
 
     @Test
@@ -252,22 +253,22 @@ public class RangeTombstoneTest extends SchemaLoader
         cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(dk(key), 
CFNAME, System.currentTimeMillis()));
 
         for (int i = 0; i < 5; i++)
-            assert isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " should be 
live";
+            assertTrue("Cell " + i + " should be live", isLive(cf, 
cf.getColumn(b(i))));
         for (int i = 16; i < 20; i++)
-            assert isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " should be 
live";
+            assertTrue("Cell " + i + " should be live", isLive(cf, 
cf.getColumn(b(i))));
         for (int i = 5; i <= 15; i++)
-            assert !isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " shouldn't 
be live";
+            assertTrue("Cell " + i + " shouldn't be live", !isLive(cf, 
cf.getColumn(b(i))));
 
         // Compact everything and re-test
         CompactionManager.instance.performMaximal(cfs);
         cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(dk(key), 
CFNAME, System.currentTimeMillis()));
 
         for (int i = 0; i < 5; i++)
-            assert isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " should be 
live";
+            assertTrue("Cell " + i + " should be live", isLive(cf, 
cf.getColumn(b(i))));
         for (int i = 16; i < 20; i++)
-            assert isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " should be 
live";
+            assertTrue("Cell " + i + " should be live", isLive(cf, 
cf.getColumn(b(i))));
         for (int i = 5; i <= 15; i++)
-            assert !isLive(cf, cf.getColumn(b(i))) : "Cell " + i + " shouldn't 
be live";
+            assertTrue("Cell " + i + " shouldn't be live", !isLive(cf, 
cf.getColumn(b(i))));
     }
 
     @Test
@@ -296,9 +297,9 @@ public class RangeTombstoneTest extends SchemaLoader
         // Get the last value of the row
         cf = cfs.getColumnFamily(QueryFilter.getSliceFilter(dk(key), CFNAME, 
Composites.EMPTY, Composites.EMPTY, true, 1, System.currentTimeMillis()));
 
-        assert !cf.isEmpty();
+        assertFalse(cf.isEmpty());
         int last = i(cf.getSortedColumns().iterator().next().name());
-        assert last == 1 : "Last column should be column 1 since column 2 has 
been deleted";
+        assertTrue("Last column should be column 1 since column 2 has been 
deleted", last == 1);
     }
 
     @Test

Reply via email to