Skip to content

Commit

Permalink
The test should wait until the worker leader is ready, otherwise the …
Browse files Browse the repository at this point in the history
…request to create function will fail (apache#7507)

* The test should wait until the worker leader is ready, otherwise the request to create function will fail

* Moved to test setup
  • Loading branch information
merlimat authored Jul 10, 2020
1 parent 02fa64c commit 5fd96e2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ && isNotBlank(workerConfig.getBrokerClientAuthenticationParameters())) {
});
fileServerThread.start();
latch.await(1, TimeUnit.SECONDS);

functionsWorkerService.getLeaderService().waitLeaderInit();


}

@AfterMethod
Expand Down Expand Up @@ -1493,7 +1497,6 @@ public void testPulsarFunctionStatus() throws Exception {

@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";
Expand Down

0 comments on commit 5fd96e2

Please sign in to comment.