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

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


The following commit(s) were added to refs/heads/master by this push:
     new 26e8004  Fix flaky 
testIOVertexHTTPServerEndpointForARWithPrometheusProvider test
26e8004 is described below

commit 26e8004e6b93f5acaff7f69dba14511a7cf44d58
Author: Charan Reddy Guttapalem <[email protected]>
AuthorDate: Sun May 19 19:53:36 2019 -0700

    Fix flaky testIOVertexHTTPServerEndpointForARWithPrometheusProvider test
    
    Descriptions of the changes in this PR:
    
    - in testIOVertexHTTPServerEndpointForARWithPrometheusProvider test
    it is not correct to assume that Auditor would have been created and
    started completely when we complete AutoRecoveryMain.start and see it
    status as started. It would make sure AuditorElector.submitElectionTask
    has submitted election task but not the completion of Auditor.start.
    So instead of relying on Auditor metric (NUM_UNDER_REPLICATED_LEDGERS),
    use ReplicationWorker metric - NUM_FULL_OR_PARTIAL_LEDGERS_REPLICATED.
    
    
    Reviewers: Enrico Olivelli <[email protected]>, Sijie Guo 
<[email protected]>
    
    This closes #2093 from reddycharan/fixflakytest
---
 .../java/org/apache/bookkeeper/bookie/BookieInitializationTest.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieInitializationTest.java
 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieInitializationTest.java
index dbaef35..8e0561b 100644
--- 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieInitializationTest.java
+++ 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieInitializationTest.java
@@ -1318,7 +1318,7 @@ public class BookieInitializationTest extends 
BookKeeperClusterTestCase {
         String metrics = metricsStringBuilder.toString();
         // do primitive checks if metrics string contains some stats
         assertTrue("Metrics should contain basic counters",
-                
metrics.contains(ReplicationStats.NUM_UNDER_REPLICATED_LEDGERS));
+                
metrics.contains(ReplicationStats.NUM_FULL_OR_PARTIAL_LEDGERS_REPLICATED));
 
         // Now, hit the rest endpoint for configs
         url = new URL("http://localhost:"; + nextFreePort + 
HttpRouter.SERVER_CONFIG);

Reply via email to