This closes Updated unit test to sleep for 10 milliseconds before adding last FlowFile to queue so that the first and last FlowFiles will have different timestamps
Moved call to sleep() up in unit test to ensure that we sleep before creating the flowfile
@@ -1712,12 +1712,17 @@ public class TestStandardProcessSession {
}
@Test
- public void testBatchQueuedHaveSameQueuedTime() {
+ public void testBatchQueuedHaveSameQueuedTime() throws InterruptedException {
for (int i = 0; i < 100; i++) {
+ if (i == 99) {
+ Thread.sleep(10);
+ }
+
final FlowFileRecord flowFile = new StandardFlowFileRecord.Builder()
.id(i)
.addAttribute("uuid", "000000000000-0000-0000-0000-0000000" + i)
.build();
+
this.flowFileQueue.put(flowFile);
}
