You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2020/03/23 15:21:28 UTC

[nifi] branch master updated: NIFI-7274 add time for test conditions to be met

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


The following commit(s) were added to refs/heads/master by this push:
     new 254b20f  NIFI-7274 add time for test conditions to be met
254b20f is described below

commit 254b20fa5ff3b3a00ccbe80b3a7f8954cb86db49
Author: Joe Witt <jo...@apache.org>
AuthorDate: Sun Mar 22 09:54:43 2020 -0400

    NIFI-7274 add time for test conditions to be met
---
 .../nifi/controller/scheduling/TestStandardProcessScheduler.java      | 4 +++-
 .../src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java           | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java
index 90bbbbb..01e368e 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/scheduling/TestStandardProcessScheduler.java
@@ -633,7 +633,9 @@ public class TestStandardProcessScheduler {
         procNode.performValidation();
         scheduler.startProcessor(procNode, true);
 
-        Thread.sleep(100L);
+        while(proc.getOnScheduledInvocationCount() < 1){
+            Thread.sleep(100L);
+        }
         assertEquals(1, proc.getOnScheduledInvocationCount());
         Thread.sleep(100L);
         assertEquals(1, proc.getOnScheduledInvocationCount());
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
index fdad692..6071474 100644
--- a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
@@ -420,6 +420,8 @@ public class DBCPServiceTest {
         server.shutdown();
         server.start();
 
+        Thread.sleep(2500L); //allow time to pass for the server to startup.
+
         // Note!! We should not get something like:
         // org.h2.jdbc.JdbcSQLException: Connection is broken: "session closed" [90067-192]
         // Pool should remove invalid connections and create new valid connections.