mirror of
https://github.com/apache/nifi.git
synced 2025-02-07 18:48:51 +00:00
NIFI-6015: This closes #3300. 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
NIFI-6015: Moved call to sleep() up in unit test to ensure that we sleep before creating the flowfile Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
8c8a9b4d53
commit
3a4c3ccbaa
@ -1712,12 +1712,17 @@ public class TestStandardProcessSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBatchQueuedHaveSameQueuedTime() {
|
public void testBatchQueuedHaveSameQueuedTime() throws InterruptedException {
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
|
if (i == 99) {
|
||||||
|
Thread.sleep(10);
|
||||||
|
}
|
||||||
|
|
||||||
final FlowFileRecord flowFile = new StandardFlowFileRecord.Builder()
|
final FlowFileRecord flowFile = new StandardFlowFileRecord.Builder()
|
||||||
.id(i)
|
.id(i)
|
||||||
.addAttribute("uuid", "000000000000-0000-0000-0000-0000000" + i)
|
.addAttribute("uuid", "000000000000-0000-0000-0000-0000000" + i)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
this.flowFileQueue.put(flowFile);
|
this.flowFileQueue.put(flowFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user