You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2012/02/21 15:14:28 UTC
[3/6] git commit: Fix CompactionsTest.testSuperColumnCompactions
(insert longs since CF uses LongType)
Fix CompactionsTest.testSuperColumnCompactions (insert longs since CF uses LongType)
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/712cfb12
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/712cfb12
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/712cfb12
Branch: refs/heads/trunk
Commit: 712cfb12dd01b368a34e6b19d16c21edcaac1487
Parents: cbb809d
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Feb 21 13:37:17 2012 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Feb 21 13:38:52 2012 +0100
----------------------------------------------------------------------
.../cassandra/db/compaction/CompactionsTest.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/712cfb12/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
index bd0b892..89fee28 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
@@ -100,12 +100,14 @@ public class CompactionsTest extends CleanupHelper
long maxTimestampExpected = Long.MIN_VALUE;
Set<DecoratedKey> inserted = new HashSet<DecoratedKey>();
ByteBuffer superColumn = ByteBufferUtil.bytes("TestSuperColumn");
- for (int j = 0; j < SSTABLES; j++) {
- for (int i = 0; i < ROWS_PER_SSTABLE; i++) {
+ for (int j = 0; j < SSTABLES; j++)
+ {
+ for (int i = 0; i < ROWS_PER_SSTABLE; i++)
+ {
DecoratedKey key = Util.dk(String.valueOf(i % 2));
RowMutation rm = new RowMutation(TABLE1, key.key);
long timestamp = j * ROWS_PER_SSTABLE + i;
- rm.add(new QueryPath("Super1", superColumn, ByteBufferUtil.bytes(String.valueOf(i / 2))),
+ rm.add(new QueryPath("Super1", superColumn, ByteBufferUtil.bytes((long)(i / 2))),
ByteBufferUtil.EMPTY_BYTE_BUFFER,
timestamp);
maxTimestampExpected = Math.max(timestamp, maxTimestampExpected);