This is an automated email from the ASF dual-hosted git repository.

joewitt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit f283c1191ca207217f3e22c24574e340b10db580
Author: Mark Payne <[email protected]>
AuthorDate: Fri Mar 6 11:46:16 2020 -0500

    Fixed unit test failed with NIFI-7232
    
    This closes #4117.
    
    Signed-off-by: Joe Witt <[email protected]>
---
 .../nifi/provenance/index/lucene/TestLuceneEventIndex.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/index/lucene/TestLuceneEventIndex.java
 
b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/index/lucene/TestLuceneEventIndex.java
index 69be483..d3733bd 100644
--- 
a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/index/lucene/TestLuceneEventIndex.java
+++ 
b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/index/lucene/TestLuceneEventIndex.java
@@ -40,6 +40,7 @@ import org.apache.nifi.provenance.store.ArrayListEventStore;
 import org.apache.nifi.provenance.store.EventStore;
 import org.apache.nifi.provenance.store.StorageResult;
 import org.apache.nifi.util.Tuple;
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
@@ -83,6 +84,11 @@ public class TestLuceneEventIndex {
         return 
System.getProperty("os.name").toLowerCase().startsWith("windows");
     }
 
+    @Before
+    public void setup() {
+        idGenerator.set(0L);
+    }
+
     @Test
     public void testGetTimeRange() {
         final long now = System.currentTimeMillis();
@@ -170,7 +176,7 @@ public class TestLuceneEventIndex {
     }
 
     @Test(timeout = 60000)
-    public void testUnauthorizedEventsGetPlaceholdersForExpandChildren() 
throws InterruptedException {
+    public void testUnauthorizedEventsGetPlaceholdersForExpandChildren() 
throws InterruptedException, IOException {
         assumeFalse(isWindowsEnvironment());
         final RepositoryConfiguration repoConfig = createConfig(1);
         repoConfig.setDesiredIndexSize(1L);
@@ -224,13 +230,15 @@ public class TestLuceneEventIndex {
 
         List<LineageNode> nodes = Collections.emptyList();
         while (nodes.size() < 5) {
-            final ComputeLineageSubmission submission = 
index.submitExpandChildren(1L, user, allowForkEvents);
+            final ComputeLineageSubmission submission = 
index.submitExpandChildren(fork.getEventId(), user, allowForkEvents);
             assertTrue(submission.getResult().awaitCompletion(15, 
TimeUnit.SECONDS));
 
             nodes = submission.getResult().getNodes();
             Thread.sleep(25L);
         }
 
+        nodes.forEach(System.out::println);
+
         assertEquals(5, nodes.size());
 
         assertEquals(1L, nodes.stream().filter(n -> n.getNodeType() == 
LineageNodeType.FLOWFILE_NODE).count());

Reply via email to