You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/05/02 12:28:24 UTC
cassandra git commit: Fix bad merge
Repository: cassandra
Updated Branches:
refs/heads/trunk b6cc43e87 -> ad7e36b8a
Fix bad merge
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ad7e36b8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ad7e36b8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ad7e36b8
Branch: refs/heads/trunk
Commit: ad7e36b8ad52c56ea33376faf57afecbb2e58630
Parents: b6cc43e
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon May 2 12:28:17 2016 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon May 2 12:28:17 2016 +0200
----------------------------------------------------------------------
test/unit/org/apache/cassandra/db/CellTest.java | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad7e36b8/test/unit/org/apache/cassandra/db/CellTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/CellTest.java b/test/unit/org/apache/cassandra/db/CellTest.java
index e7e90a1..1249989 100644
--- a/test/unit/org/apache/cassandra/db/CellTest.java
+++ b/test/unit/org/apache/cassandra/db/CellTest.java
@@ -53,8 +53,6 @@ public class CellTest
.addRegularColumn("m", MapType.getInstance(IntegerType.instance, IntegerType.instance, true))
.build();
- private static final CFMetaData fakeMetadata = CFMetaData.createFake("fakeKS", "fakeTable");
-
@BeforeClass
public static void defineSchema() throws ConfigurationException
{
@@ -64,8 +62,8 @@ public class CellTest
private static ColumnDefinition fakeColumn(String name, AbstractType<?> type)
{
- return new ColumnDefinition(fakeMetadata.ksName,
- fakeMetadata.cfName,
+ return new ColumnDefinition("fakeKs",
+ "fakeTable",
ColumnIdentifier.getInterned(name, false),
type,
ColumnDefinition.NO_POSITION,
@@ -127,8 +125,8 @@ public class CellTest
// Valid cells
c = fakeColumn("c", Int32Type.instance);
- assertValid(BufferCell.live(fakeMetadata, c, 0, ByteBufferUtil.EMPTY_BYTE_BUFFER));
- assertValid(BufferCell.live(fakeMetadata, c, 0, ByteBufferUtil.bytes(4)));
+ assertValid(BufferCell.live(c, 0, ByteBufferUtil.EMPTY_BYTE_BUFFER));
+ assertValid(BufferCell.live(c, 0, ByteBufferUtil.bytes(4)));
assertValid(BufferCell.expiring(c, 0, 4, 4, ByteBufferUtil.EMPTY_BYTE_BUFFER));
assertValid(BufferCell.expiring(c, 0, 4, 4, ByteBufferUtil.bytes(4)));
@@ -137,11 +135,11 @@ public class CellTest
// Invalid value (we don't all empty values for smallint)
c = fakeColumn("c", ShortType.instance);
- assertInvalid(BufferCell.live(fakeMetadata, c, 0, ByteBufferUtil.EMPTY_BYTE_BUFFER));
+ assertInvalid(BufferCell.live(c, 0, ByteBufferUtil.EMPTY_BYTE_BUFFER));
// But this should be valid even though the underlying value is an empty BB (catches bug #11618)
assertValid(BufferCell.tombstone(c, 0, 4));
// And of course, this should be valid with a proper value
- assertValid(BufferCell.live(fakeMetadata, c, 0, ByteBufferUtil.bytes((short)4)));
+ assertValid(BufferCell.live(c, 0, ByteBufferUtil.bytes((short)4)));
// Invalid ttl
assertInvalid(BufferCell.expiring(c, 0, -4, 4, ByteBufferUtil.bytes(4)));
@@ -151,9 +149,9 @@ public class CellTest
c = fakeColumn("c", MapType.getInstance(Int32Type.instance, Int32Type.instance, true));
// Valid cell path
- assertValid(BufferCell.live(fakeMetadata, c, 0, ByteBufferUtil.bytes(4), CellPath.create(ByteBufferUtil.bytes(4))));
+ assertValid(BufferCell.live(c, 0, ByteBufferUtil.bytes(4), CellPath.create(ByteBufferUtil.bytes(4))));
// Invalid cell path (int values should be 0 or 4 bytes)
- assertInvalid(BufferCell.live(fakeMetadata, c, 0, ByteBufferUtil.bytes(4), CellPath.create(ByteBufferUtil.bytes((long)4))));
+ assertInvalid(BufferCell.live(c, 0, ByteBufferUtil.bytes(4), CellPath.create(ByteBufferUtil.bytes((long)4))));
}
@Test