sarankk commented on code in PR #155:
URL: 
https://github.com/apache/cassandra-analytics/pull/155#discussion_r2539946282


##########
cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/SSTableReaderTests.java:
##########
@@ -143,4 +146,161 @@ private void 
testTtlUsingConstantReferenceTimeHelper(CassandraBridge bridgeForTe
         .forAll(TestUtils.partitioners())
         .checkAssert(partitioner -> runTest(partitioner, bridgeForTest, test));
     }
+
+    // TimeRangeFilter Tests
+
+    @ParameterizedTest
+    @MethodSource("org.apache.cassandra.bridge.VersionRunner#bridges")
+    public void testTimeRangeFilterSkipsSSTablesOutsideRange(CassandraBridge 
bridge)
+    {
+        TestRunnable test = (partitioner, dir, bridgeInTest) -> {
+            TestSchema schema = TestSchema.builder(bridgeInTest)
+                                          .withPartitionKey("a", 
bridgeInTest.aInt())
+                                          .withColumn("b", bridgeInTest.aInt())
+                                          .build();
+
+            // Write SSTable with data
+            schema.writeSSTable(dir, bridgeInTest, partitioner, writer -> {
+                for (int i = 0; i < 10; i++)
+                {
+                    writer.write(i, i * 100);
+                }
+            });
+
+            // Wait to ensure timestamp advances
+            Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
+            long currentTimestampMicros = 
TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()); // Convert to 
microseconds

Review Comment:
   Wait was unnecessary, removed it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to