This is an automated email from the ASF dual-hosted git repository.
yong 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 7a5f8912c8 make waitForNewAuditor stronger. (#4078)
7a5f8912c8 is described below
commit 7a5f8912c8916dd0f07d1ff42881068f46c91c08
Author: Yan Zhao <[email protected]>
AuthorDate: Mon Dec 4 10:47:00 2023 +0800
make waitForNewAuditor stronger. (#4078)
### Motivation
Make AuditorBookieTest#waitForNewAuditor stronger.
---
.../apache/bookkeeper/replication/AuditorBookieTest.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorBookieTest.java
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorBookieTest.java
index 4a88b8670f..1bf5698362 100644
---
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorBookieTest.java
+++
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorBookieTest.java
@@ -267,12 +267,15 @@ public class AuditorBookieTest extends
BookKeeperClusterTestCase {
BookieServer newAuditor = null;
int retryCount = 8;
while (retryCount > 0) {
- List<BookieServer> auditors = getAuditorBookie();
- if (auditors.size() > 0) {
- newAuditor = auditors.get(0);
- if (auditor != newAuditor) {
- break;
+ try {
+ List<BookieServer> auditors = getAuditorBookie();
+ if (auditors.size() > 0) {
+ newAuditor = auditors.get(0);
+ if (auditor != newAuditor) {
+ break;
+ }
}
+ } catch (Exception ignore) {
}
Thread.sleep(500);
retryCount--;