davsclaus commented on code in PR #28136:
URL: https://github.com/apache/camel/pull/28136#discussion_r4324150528
##########
components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3StreamUploadTimestampGroupingIT.java:
##########
@@ -75,23 +75,13 @@ public void process(Exchange exchange) {
});
List<S3Object> resp = ex.getMessage().getBody(List.class);
- assertEquals(2, resp.size(), "Should create 2 files for 2 different
timestamp windows");
-
- // Verify files have timestamp-based naming
- boolean foundWindow1File = false;
- boolean foundWindow2File = false;
-
- for (S3Object s3Object : resp) {
- String key = s3Object.key();
- if (key.contains("20240101_0800_0800-0805")) {
- foundWindow1File = true;
- } else if (key.contains("20240101_0805_0805-0810")) {
- foundWindow2File = true;
- }
- }
-
- assertTrue(foundWindow1File, "Should find file for first timestamp
window");
- assertTrue(foundWindow2File, "Should find file for second timestamp
window");
+ // batchMessageNumber=5: each window is uploaded twice, and the second
upload of a window gets its own object
+ assertEquals(List.of(
Review Comment:
Nit: on a surefire rerun the bucket still holds the four objects of the
first run, and the new producer lists them and continues with `-2` and `-3`, so
this exact list fails on the rerun. Emptying the bucket in a `@BeforeEach`
(like the ITs in #28137) avoids that, here and in the EdgeCases 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]