You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2020/07/10 22:49:05 UTC

[pulsar] branch master updated: The test should wait until the worker leader is ready, otherwise the request to create function will fail (#7507)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5fd96e2  The test should wait until the worker leader is ready, otherwise the request to create function will fail (#7507)
5fd96e2 is described below

commit 5fd96e283f1e528d5e86547a25713b39addf17e3
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Fri Jul 10 15:48:47 2020 -0700

    The test should wait until the worker leader is ready, otherwise the request to create function will fail (#7507)
    
    * The test should wait until the worker leader is ready, otherwise the request to create function will fail
    
    * Moved to test setup
---
 .../src/test/java/org/apache/pulsar/io/PulsarFunctionE2ETest.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionE2ETest.java b/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionE2ETest.java
index e9e3b68..456ab4b 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionE2ETest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionE2ETest.java
@@ -293,6 +293,10 @@ public class PulsarFunctionE2ETest {
         });
         fileServerThread.start();
         latch.await(1, TimeUnit.SECONDS);
+
+        functionsWorkerService.getLeaderService().waitLeaderInit();
+
+
     }
 
     @AfterMethod
@@ -1493,7 +1497,6 @@ public class PulsarFunctionE2ETest {
 
     @Test(dataProvider = "validRoleName")
     public void testAuthorization(boolean validRoleName) throws Exception {
-
         final String namespacePortion = "io";
         final String replNamespace = tenant + "/" + namespacePortion;
         final String sinkTopic = "persistent://" + replNamespace + "/output";