Skip to content

Commit 128055f

Browse files
committed
feat: add bookies test
Signed-off-by: moxiaoying <[email protected]>
1 parent 044da3b commit 128055f

File tree

1 file changed

+3
-0
lines changed
  • bookkeeper-admin/src/main/java/io/github/protocol/bookkeeper/admin/jdk

1 file changed

+3
-0
lines changed

bookkeeper-admin/src/main/java/io/github/protocol/bookkeeper/admin/jdk/BookiesImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public Map<String, String> bookieList() throws BookkeeperAdminException {
3434
public Map<String, String> listBookieInfo() throws BookkeeperAdminException {
3535
try {
3636
HttpResponse resp = innerHttpClient.get(UrlConst.BOOKIE_LIST_INFO);
37+
if (resp.statusCode() < 200 || resp.statusCode() >= 300) {
38+
throw new BookkeeperAdminException(resp.bodyAsString());
39+
}
3740
return JacksonService.toRefer(resp.body(), new TypeReference<Map<String, String>>() {
3841
});
3942
} catch (Exception e) {

0 commit comments

Comments
 (0)