cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] cassandra git commit: Use constant nowInSec for SinglePartitionReadCommands in QueryPager test
Date Tue, 24 Nov 2015 13:50:57 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.1 383eb46b3 -> c37dbdbe3


Use constant nowInSec for SinglePartitionReadCommands in QueryPager test

patch by jkni; reviewed by slebresne for CASSANDRA-10754


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

Branch: refs/heads/cassandra-3.1
Commit: 9dac99f8179f503941038ed7f92b2341bb8f0010
Parents: c7e74f3
Author: Joel Knighton <joel.knighton@datastax.com>
Authored: Mon Nov 23 17:42:06 2015 -0600
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Nov 24 14:48:38 2015 +0100

----------------------------------------------------------------------
 test/unit/org/apache/cassandra/service/QueryPagerTest.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9dac99f8/test/unit/org/apache/cassandra/service/QueryPagerTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java
index 15bc060..bfc66e0 100644
--- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java
+++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java
@@ -53,6 +53,7 @@ public class QueryPagerTest
     public static final String CF_STANDARD = "Standard1";
     public static final String KEYSPACE_CQL = "cql_keyspace";
     public static final String CF_CQL = "table2";
+    public static final int nowInSec = FBUtilities.nowInSeconds();
 
     @BeforeClass
     public static void defineSchema() throws ConfigurationException
@@ -159,7 +160,7 @@ public class QueryPagerTest
         Slice slice = Slice.make(cmp.make(start), cmp.make(end));
         ClusteringIndexSliceFilter filter = new ClusteringIndexSliceFilter(Slices.with(cmp,
slice), reversed);
 
-        return SinglePartitionReadCommand.create(cfs().metadata, FBUtilities.nowInSeconds(),
ColumnFilter.all(metadata), RowFilter.NONE, DataLimits.NONE, Util.dk(key), filter);
+        return SinglePartitionReadCommand.create(cfs().metadata, nowInSec, ColumnFilter.all(metadata),
RowFilter.NONE, DataLimits.NONE, Util.dk(key), filter);
     }
 
     private static ReadCommand rangeNamesQuery(String keyStart, String keyEnd, int count,
String... names)
@@ -425,7 +426,7 @@ public class QueryPagerTest
         for (int i = 0; i < 5; i++)
             executeInternal(String.format("INSERT INTO %s.%s (k, c, v) VALUES ('k%d', 'c%d',
null)", keyspace, table, 0, i));
 
-        ReadCommand command = SinglePartitionReadCommand.create(cfs.metadata, FBUtilities.nowInSeconds(),
Util.dk("k0"), Slice.ALL);
+        ReadCommand command = SinglePartitionReadCommand.create(cfs.metadata, nowInSec, Util.dk("k0"),
Slice.ALL);
 
         QueryPager pager = command.getPager(null, Server.CURRENT_VERSION);
 


Mime
View raw message