jojochuang commented on code in PR #11464:
URL: https://github.com/apache/ozone/pull/11464#discussion_r4250651813


##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/TestS3GatewayHttpServers.java:
##########
@@ -46,6 +54,23 @@ class TestS3GatewayHttpServers {
   @TempDir
   private Path tempDir;
 
+  /**
+   * Switching {@link UserGroupInformation} to Kerberos reads the default
+   * realm, which the JDK resolves from these properties when there is no
+   * krb5.conf, as in CI.
+   */
+  @BeforeAll
+  static void fakeKerberosRealm() {
+    System.setProperty("java.security.krb5.realm", "EXAMPLE.COM");
+    System.setProperty("java.security.krb5.kdc", "localhost");
+  }
+
+  @AfterAll
+  static void clearKerberosRealm() {
+    System.clearProperty("java.security.krb5.realm");
+    System.clearProperty("java.security.krb5.kdc");
+  }

Review Comment:
   good catch.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to