You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2013/02/06 05:10:05 UTC
[1/3] git commit: fix CompactionsTest assertion error
fix CompactionsTest assertion error
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f3091835
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f3091835
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f3091835
Branch: refs/heads/cassandra-1.2
Commit: f3091835e67ebdc0171991b2ca283e6cd357cda3
Parents: 7a90c74
Author: Yuki Morishita <yu...@apache.org>
Authored: Tue Feb 5 22:09:40 2013 -0600
Committer: Yuki Morishita <yu...@apache.org>
Committed: Tue Feb 5 22:09:40 2013 -0600
----------------------------------------------------------------------
.../cassandra/db/compaction/CompactionsTest.java | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3091835/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 302c651..e543b00 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
@@ -284,10 +284,8 @@ public class CompactionsTest extends SchemaLoader
public void testCompactionLog() throws Exception
{
SystemTable.discardCompactionsInProgress();
- SetMultimap<Pair<String, String>, Integer> compactionLogs = SystemTable.getUnfinishedCompactions();
- assert compactionLogs.isEmpty();
- String cf = "Standard1";
+ String cf = "Standard4";
ColumnFamilyStore cfs = Table.open(TABLE1).getColumnFamilyStore(cf);
insertData(TABLE1, cf, 0, 1);
cfs.forceBlockingFlush();
@@ -302,13 +300,13 @@ public class CompactionsTest extends SchemaLoader
}
}));
UUID taskId = SystemTable.startCompaction(cfs, sstables);
- compactionLogs = SystemTable.getUnfinishedCompactions();
+ SetMultimap<Pair<String, String>, Integer> compactionLogs = SystemTable.getUnfinishedCompactions();
Set<Integer> unfinishedCompactions = compactionLogs.get(Pair.create(TABLE1, cf));
assert unfinishedCompactions.containsAll(generations);
SystemTable.finishCompaction(taskId);
compactionLogs = SystemTable.getUnfinishedCompactions();
- assert compactionLogs.isEmpty();
+ assert !compactionLogs.containsKey(Pair.create(TABLE1, cf));
}
private void testDontPurgeAccidentaly(String k, String cfname, boolean forceDeserialize) throws IOException, ExecutionException, InterruptedException