cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/6] git commit: fix test for CASSANDRA-5166
Date Fri, 18 Jan 2013 19:18:50 GMT
fix test for CASSANDRA-5166


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

Branch: refs/heads/cassandra-1.2
Commit: be01197786a8122fc17ba457a2c77ffdfab2af07
Parents: f930eb7
Author: Yuki Morishita <yukim@apache.org>
Authored: Fri Jan 18 13:17:55 2013 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Fri Jan 18 13:17:55 2013 -0600

----------------------------------------------------------------------
 .../cassandra/io/sstable/SSTableReaderTest.java    |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/be011977/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 fd0c1c6..334179f 100644
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
@@ -292,18 +292,19 @@ public class SSTableReaderTest extends SchemaLoader
     public void testLoadingSavedKeyCache() throws Exception
     {
         final String ks = "Keyspace1";
-        final String cf = "Standard1";
+        final String cf = "Standard4";
         CFMetaData meta = Schema.instance.getCFMetaData(ks, cf);
         Table.clear(ks);
 
         ByteBuffer key = ByteBufferUtil.bytes("key");
         CacheService.instance.keyCache.setCapacity(1024);
-        File dir = Directories.create(ks, cf).getDirectoryForNewSSTables(100);
+        Directories directories = Directories.create(ks, cf);
+        File dir = directories.getDirectoryForNewSSTables(100);
         SSTableSimpleWriter writer = new SSTableSimpleWriter(dir, meta, StorageService.getPartitioner());
         writer.newRow(key);
         writer.addColumn(ByteBufferUtil.bytes("col"), ByteBufferUtil.EMPTY_BYTE_BUFFER, 1);
         writer.close();
-        Descriptor desc = Descriptor.fromFilename(dir, String.format("%s-%s-%s-1-Data.db",
ks, cf, Descriptor.CURRENT_VERSION)).left;
+        Descriptor desc = directories.sstableLister().list().keySet().iterator().next();
 
         File cachePath = CacheService.instance.keyCache.getCachePath(ks, cf);
         SequentialWriter out = SequentialWriter.open(cachePath);


Mime
View raw message