keemgdeok commented on code in PR #23816:
URL: https://github.com/apache/kafka/pull/23816#discussion_r4282584703


##########
storage/src/test/java/org/apache/kafka/tiered/storage/integration/RollAndOffloadActiveSegmentTest.java:
##########
@@ -89,11 +94,21 @@ private void 
executeRollAndOffloadActiveSegmentTest(ClusterInstance clusterInsta
                 .expectEarliestLocalOffsetInLogDirectory(topicA, p0, 4L)
                 .produce(topicA, p0, new KeyValueSpec("k0", "v0"), new 
KeyValueSpec("k1", "v1"),
                         new KeyValueSpec("k2", "v2"), new KeyValueSpec("k3", 
"v3"))
+                // Local retention must not advance the start offset of data 
still available remotely.
+                .expectListOffsets(topicA, p0, OffsetSpec.earliest(), new 
EpochEntry(0, 0))
+                .expectListOffsets(topicA, p0, OffsetSpec.earliestLocal(), new 
EpochEntry(0, 4))
                 // consume from the beginning of the topic to read data from 
local and remote storage
                 .expectFetchFromTieredStorage(broker0, topicA, p0, 4)
                 .consume(topicA, p0, 0L, 4, 4);
 
         builder.build().execute(clusterInstance, groupProtocol);
+
+        // Rolling the final segment must not advance offsets beyond the four 
produced records.
+        UnifiedLog log = clusterInstance.brokers().get(broker0).logManager()

Review Comment:
   Moved the checks into `ExpectLogOffsetsAction` after `produce()`, before the 
explicit consume. The runner now records assertion failures before printing the 
report.



-- 
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]

Reply via email to