cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject cassandra git commit: fix DTCS test
Date Wed, 15 Apr 2015 11:28:20 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 1fab09989 -> 53848f71a


fix DTCS test


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

Branch: refs/heads/cassandra-2.0
Commit: 53848f71a81631dccdf879060bcd32d244be5ea1
Parents: 1fab099
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Wed Apr 15 13:19:03 2015 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Wed Apr 15 13:19:03 2015 +0200

----------------------------------------------------------------------
 .../db/compaction/DateTieredCompactionStrategyTest.java         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/53848f71/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
b/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
index 1fa41a3..d7caf6b 100644
--- a/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
@@ -288,7 +288,7 @@ public class DateTieredCompactionStrategyTest extends SchemaLoader
         // create 2 sstables
         DecoratedKey key = Util.dk(String.valueOf("expired"));
         RowMutation rm = new RowMutation(KEYSPACE1, key.key);
-        rm.add(CF_STANDARD1, ByteBufferUtil.bytes("column"), value, System.currentTimeMillis(),
5);
+        rm.add(CF_STANDARD1, ByteBufferUtil.bytes("column"), value, System.currentTimeMillis(),
1);
         rm.apply();
         cfs.forceBlockingFlush();
         SSTableReader expiredSSTable = cfs.getSSTables().iterator().next();
@@ -308,12 +308,13 @@ public class DateTieredCompactionStrategyTest extends SchemaLoader
         DateTieredCompactionStrategy dtcs = new DateTieredCompactionStrategy(cfs, options);
         dtcs.startup();
         assertNull(dtcs.getNextBackgroundTask((int) (System.currentTimeMillis() / 1000)));
-        Thread.sleep(7000);
+        Thread.sleep(2000);
         AbstractCompactionTask t = dtcs.getNextBackgroundTask((int) (System.currentTimeMillis()/1000));
         assertNotNull(t);
         assertEquals(1, Iterables.size(t.sstables));
         SSTableReader sstable = t.sstables.iterator().next();
         assertEquals(sstable, expiredSSTable);
+        cfs.getDataTracker().unmarkCompacting(cfs.getSSTables());
     }
 
 }


Mime
View raw message