Use constant nowInSec for SinglePartitionReadCommands in QueryPager test

patch by jkni; reviewed by slebresne for CASSANDRA-10754
This commit is contained in:
Joel Knighton 2015-11-23 17:42:06 -06:00 committed by Sylvain Lebresne
parent c7e74f3494
commit 9dac99f817
1 changed files with 3 additions and 2 deletions

View File

@ -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);