cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/4] git commit: fix sstr test
Date Wed, 30 Oct 2013 21:12:42 GMT
Updated Branches:
  refs/heads/cassandra-2.0 830711c72 -> 47b8fc422
  refs/heads/trunk 3d00fe6cd -> ddb8bc68a


fix sstr test


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

Branch: refs/heads/cassandra-2.0
Commit: 47b8fc422f3978c7173c91e7324953d81e5f5b63
Parents: 830711c
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Oct 30 16:10:26 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Oct 30 16:10:26 2013 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/io/sstable/SSTableReaderTest.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/47b8fc42/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
index 8a9619d..427d089 100644
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
@@ -305,12 +305,13 @@ public class SSTableReaderTest extends SchemaLoader
             foundScanner = true;
         }
         assertTrue(foundScanner);
+    }
 
     @Test
     public void testGetPositionsForRangesFromTableOpenedForBulkLoading() throws IOException,
ExecutionException, InterruptedException
     {
-        Table table = Table.open("Keyspace1");
-        ColumnFamilyStore store = table.getColumnFamilyStore("Standard2");
+        Keyspace keyspace = Keyspace.open("Keyspace1");
+        ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
 
         // insert data and compact to a single sstable. The
         // number of keys inserted is greater than index_interval
@@ -320,7 +321,7 @@ public class SSTableReaderTest extends SchemaLoader
         {
             ByteBuffer key = ByteBufferUtil.bytes(String.valueOf(j));
             RowMutation rm = new RowMutation("Keyspace1", key);
-            rm.add(new QueryPath("Standard2", null, ByteBufferUtil.bytes("0")), ByteBufferUtil.EMPTY_BYTE_BUFFER,
j);
+            rm.add("Standard2", ByteBufferUtil.bytes("0"), ByteBufferUtil.EMPTY_BYTE_BUFFER,
j);
             rm.apply();
         }
         store.forceBlockingFlush();
@@ -337,7 +338,7 @@ public class SSTableReaderTest extends SchemaLoader
 
         // re-open the same sstable as it would be during bulk loading
         Set<Component> components = Sets.newHashSet(Component.DATA, Component.PRIMARY_INDEX);
-        SSTableReader bulkLoaded = SSTableReader.openForBatch(sstable.descriptor, components,
sstable.partitioner);
+        SSTableReader bulkLoaded = SSTableReader.openForBatch(sstable.descriptor, components,
store.metadata, sstable.partitioner);
         sections = bulkLoaded.getPositionsForRanges(ranges);
         assert sections.size() == 1 : "Expected to find range in sstable opened for bulk
loading";
     }


Mime
View raw message