Skip to content

Commit

Permalink
remove useless check in tests (#1471)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e686d4)
  • Loading branch information
gaoran10 committed Dec 19, 2024
1 parent f5b433a commit 2dbe73c
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,6 @@ public static void setFieldValue(Class clazz, Object classObj, String fieldName,
field.set(classObj, fieldValue);
}

public void checkPulsarServiceState() {
for (PulsarService pulsarService : pulsarServiceList) {
Mockito.when(pulsarService.getState()).thenReturn(PulsarService.State.Started);
}
}

/**
* Get available proxy port.
* @return random proxy port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public void setup() throws Exception {
NamespaceName.get(ns), "__lookup__").toString());
}
}

checkPulsarServiceState();
}

@AfterClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ protected void setup() throws Exception {
NamespaceName.get(ns), "__lookup__").toString());
}
}

checkPulsarServiceState();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public void setup() throws Exception {
}
((PulsarClientImpl) getPulsarServiceList().get(0).getClient()).getLookup().
getBroker(TopicName.get("public/vhost1/test")).join();
checkPulsarServiceState();
assumeTrue(shouldRun());
openConnection();
openChannel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,6 @@ public static void setFieldValue(Class clazz, Object classObj, String fieldName,
field.set(classObj, fieldValue);
}

public void checkPulsarServiceState() {
for (PulsarService pulsarService : pulsarServiceList) {
doReturn(PulsarService.State.Started).when(pulsarService).getState();
}
}

/**
* Get available proxy port.
* @return random proxy port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ public void setup() throws Exception {
NamespaceName.get(ns), "__lookup__").toString());
}
}

checkPulsarServiceState();
}

@AfterClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public void setup() throws Exception {
NamespaceName.get(ns), "__lookup__").toString());
}
}

checkPulsarServiceState();
}

@AfterClass
Expand Down

0 comments on commit 2dbe73c

Please sign in to comment.