cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [1/3] cassandra git commit: Fix failing unit tests post-10796
Date Fri, 04 Dec 2015 21:38:50 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk c50372367 -> 2f6a9f0be


Fix failing unit tests post-10796

Patch by Tyler Hobbs as a follow-up to CASSANDRA-10796


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

Branch: refs/heads/trunk
Commit: 587fd9f77a7dd75f6264cdbd4e82f526dfa28745
Parents: cf56770
Author: Tyler Hobbs <tylerlhobbs@gmail.com>
Authored: Fri Dec 4 15:37:39 2015 -0600
Committer: Tyler Hobbs <tylerlhobbs@gmail.com>
Committed: Fri Dec 4 15:37:39 2015 -0600

----------------------------------------------------------------------
 test/unit/org/apache/cassandra/cql3/CQLTester.java | 4 ++--
 test/unit/org/apache/cassandra/cql3/ViewTest.java  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/587fd9f7/test/unit/org/apache/cassandra/cql3/CQLTester.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CQLTester.java b/test/unit/org/apache/cassandra/cql3/CQLTester.java
index fd9bb28..71bc238 100644
--- a/test/unit/org/apache/cassandra/cql3/CQLTester.java
+++ b/test/unit/org/apache/cassandra/cql3/CQLTester.java
@@ -732,9 +732,9 @@ public abstract class CQLTester
                                                                                         
       .getCodecRegistry()
                                                                                         
       .codecFor(type);
                 ByteBuffer expectedByteValue = codec.serialize(expected[j], ProtocolVersion.fromInt(protocolVersion));
-                int expectedBytes = expectedByteValue.remaining();
+                int expectedBytes = expectedByteValue == null ? -1 : expectedByteValue.remaining();
                 ByteBuffer actualValue = actual.getBytesUnsafe(meta.getName(j));
-                int actualBytes = actualValue.remaining();
+                int actualBytes = actualValue == null ? -1 : actualValue.remaining();
                 if (!Objects.equal(expectedByteValue, actualValue))
                     Assert.fail(String.format("Invalid value for row %d column %d (%s of
type %s), " +
                                               "expected <%s> (%d bytes) but got <%s>
(%d bytes) " +

http://git-wip-us.apache.org/repos/asf/cassandra/blob/587fd9f7/test/unit/org/apache/cassandra/cql3/ViewTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/ViewTest.java b/test/unit/org/apache/cassandra/cql3/ViewTest.java
index 101eb3d..8ae21df 100644
--- a/test/unit/org/apache/cassandra/cql3/ViewTest.java
+++ b/test/unit/org/apache/cassandra/cql3/ViewTest.java
@@ -935,7 +935,7 @@ public class ViewTest extends CQLTester
         createView("mv1", "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE a IS NOT
NULL AND b IS NOT NULL AND d IS NOT NULL PRIMARY KEY (a, d, b)");
 
         updateView("INSERT INTO %s (a, b, c, d) VALUES (?, ?, ?, ?)", 0, 0, 0, 0);
-        ResultSet mvRows = executeNet(protocolVersion, "SELECT a, d, b, cFROM mv1");
+        ResultSet mvRows = executeNet(protocolVersion, "SELECT a, d, b, c FROM mv1");
         assertRowsNet(protocolVersion, mvRows, row(0, 0, 0, 0));
 
         updateView("DELETE c FROM %s WHERE a = ? AND b = ?", 0, 0);


Mime
View raw message