mirror of https://github.com/apache/cassandra
Use constant nowInSec for SinglePartitionReadCommands in QueryPager test
patch by jkni; reviewed by slebresne for CASSANDRA-10754
This commit is contained in:
parent
c7e74f3494
commit
9dac99f817
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue