virajjasani commented on code in PR #8604:
URL: https://github.com/apache/hbase/pull/8604#discussion_r3937860983
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java:
##########
@@ -3731,21 +3732,51 @@ public MiniKdc setupMiniKdc(File keytabFile) throws
Exception {
dir = new File(getDataTestDir("kdc").toUri().getPath());
kdc = new MiniKdc(conf, dir);
kdc.start();
- } catch (BindException e) {
+ } catch (Exception e) {
+ // Catch Exception, not BindException/KrbException: Kerby wraps the
bind failure in a
+ // KrbException whose shape varies by version (see isBindException),
so we recognise the
+ // port conflict via that predicate rather than a type. We also avoid
importing kerby types
+ // here (see HBASE-29117).
+ if (!isBindException(e)) {
+ throw e; // not a port conflict, do not mask the real failure behind
a retry
Review Comment:
Do we not need to delete dir?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]