From ff65b42e88dbea823877ac58e72b4b126ccb20c1 Mon Sep 17 00:00:00 2001 From: Andy LoPresto Date: Thu, 22 Jun 2017 16:19:06 -0400 Subject: [PATCH] NIFI-4110 Added Thread.sleep() to ensure provenance event indexing occurs before retrieval and unit test passes. Signed-off-by: Scott Aslan This closes #1935 --- .../EncryptedWriteAheadProvenanceRepositoryTest.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/groovy/org/apache/nifi/provenance/EncryptedWriteAheadProvenanceRepositoryTest.groovy b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/groovy/org/apache/nifi/provenance/EncryptedWriteAheadProvenanceRepositoryTest.groovy index 7cc4919f3d..01c4982464 100644 --- a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/groovy/org/apache/nifi/provenance/EncryptedWriteAheadProvenanceRepositoryTest.groovy +++ b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/groovy/org/apache/nifi/provenance/EncryptedWriteAheadProvenanceRepositoryTest.groovy @@ -228,6 +228,9 @@ class EncryptedWriteAheadProvenanceRepositoryTest { repo.registerEvent(record) } + // Ensure there is not a timing issue retrieving all records + Thread.sleep(1000) + final List recoveredRecords = repo.getEvents(0L, RECORD_COUNT + 1) logger.info("Recovered ${recoveredRecords.size()} events: ")