Skip to content

Commit

Permalink
make waitForNewAuditor stronger. (#4078)
Browse files Browse the repository at this point in the history
### Motivation
Make AuditorBookieTest#waitForNewAuditor stronger.
  • Loading branch information
horizonzy authored Dec 4, 2023
1 parent b3662b7 commit 7a5f891
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,15 @@ private BookieServer waitForNewAuditor(BookieServer auditor)
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--;
Expand Down

0 comments on commit 7a5f891

Please sign in to comment.