cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [3/6] cassandra git commit: Fix TimeTypeTest - comparing AbstractType.compare() with -1 or 1.
Date Fri, 17 Jun 2016 16:51:04 GMT
Fix TimeTypeTest - comparing AbstractType.compare() with -1 or 1.

Patch by rodaira; reviewed by jmckenzie for CASSANDRA-11948


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

Branch: refs/heads/trunk
Commit: fd91e1593941d39c536d28542af539e5009be0d4
Parents: 0d8e7b1
Author: Rei Odaira <rodaira@us.ibm.com>
Authored: Thu Jun 2 16:01:17 2016 -0500
Committer: Josh McKenzie <jmckenzie@apache.org>
Committed: Fri Jun 17 12:49:20 2016 -0400

----------------------------------------------------------------------
 test/unit/org/apache/cassandra/db/marshal/TimeTypeTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd91e159/test/unit/org/apache/cassandra/db/marshal/TimeTypeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/marshal/TimeTypeTest.java b/test/unit/org/apache/cassandra/db/marshal/TimeTypeTest.java
index 3057b9c..699c805 100644
--- a/test/unit/org/apache/cassandra/db/marshal/TimeTypeTest.java
+++ b/test/unit/org/apache/cassandra/db/marshal/TimeTypeTest.java
@@ -48,14 +48,14 @@ public class TimeTypeTest
 
         b1 = TimeSerializer.instance.serialize(0L);
         b2 = TimeSerializer.instance.serialize(10000000L);
-        assert TimeType.instance.compare(b1, b2) == -1 : "Failed < comparison on 0";
+        assert TimeType.instance.compare(b1, b2) < 0 : "Failed < comparison on 0";
 
         b1 = TimeSerializer.instance.serialize(0L);
         b2 = TimeSerializer.instance.serialize(TimeUnit.DAYS.toNanos(1));
-        assert TimeType.instance.compare(b1, b2) == -1 : "Failed < comparison against
max range.";
+        assert TimeType.instance.compare(b1, b2) < 0 : "Failed < comparison against
max range.";
 
         b1 = TimeSerializer.instance.serialize(TimeUnit.DAYS.toNanos(1));
         b2 = TimeSerializer.instance.serialize(0L);
-        assert TimeType.instance.compare(b1, b2) == 1 : "Failed > comparison against max
range.";
+        assert TimeType.instance.compare(b1, b2) > 0 : "Failed > comparison against
max range.";
     }
 }


Mime
View raw message