Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Sep 18, 2024
1 parent 99d9827 commit 956cfbe
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,8 @@ class Suite implements GroovyInterceptable {
}
}

List<String> getFrontendIpHttpPort() {
return sql_return_maparray("show frontends").collect { it.Host + ":" + it.HttpPort };
List<String> getFrontendIpEditlogPort() {
return sql_return_maparray("show frontends").collect { it.Host + ":" + it.EditLogPort };
}

void getBackendIpHttpPort(Map<String, String> backendId_to_backendIP, Map<String, String> backendId_to_backendHttpPort) {
Expand Down Expand Up @@ -1490,12 +1490,16 @@ class Suite implements GroovyInterceptable {
}

void waitAddFeFinished(String host, int port) {
logger.info("waiting for ${host}:${port}")
Awaitility.await().atMost(60, TimeUnit.SECONDS).with().pollDelay(100, TimeUnit.MILLISECONDS).and()
.pollInterval(100, TimeUnit.MILLISECONDS).await().until(() -> {
def frontends = getFrontendIpHttpPort()
def frontends = getFrontendIpEditlogPort()
logger.info("frontends ${frontends}")
boolean matched = false
String expcetedFE = "${host}:${port}"
for (frontend: frontends) {
if (frontend == "$host:$port") {
logger.info("checking fe ${frontend}, expectedFe ${expcetedFE}")
if (frontend.equals(expcetedFE)) {
matched = true;
}
}
Expand All @@ -1506,7 +1510,7 @@ class Suite implements GroovyInterceptable {
void waitDropFeFinished(String host, int port) {
Awaitility.await().atMost(60, TimeUnit.SECONDS).with().pollDelay(100, TimeUnit.MILLISECONDS).and()
.pollInterval(100, TimeUnit.MILLISECONDS).await().until(() -> {
def frontends = getFrontendIpHttpPort()
def frontends = getFrontendIpEditlogPort()
boolean matched = false
for (frontend: frontends) {
if (frontend == "$host:$port") {
Expand Down

0 comments on commit 956cfbe

Please sign in to comment.