cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Fix CompactionsTest.testSuperColumnCompactions (insert longs since CF uses LongType)
Date Tue, 21 Feb 2012 12:39:45 GMT
Updated Branches:
  refs/heads/cassandra-1.0 cbb809d35 -> 712cfb12d


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/cassandra-1.0
Commit: 712cfb12dd01b368a34e6b19d16c21edcaac1487
Parents: cbb809d
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Feb 21 13:37:17 2012 +0100
Committer: Sylvain Lebresne <sylvain@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);


Mime
View raw message