diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/BaseTestImpersonation.java b/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/BaseTestImpersonation.java index f1d471d09e6..37ae508c37c 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/BaseTestImpersonation.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/BaseTestImpersonation.java @@ -103,6 +103,13 @@ protected static void startMiniDfsCluster(String testClass, boolean isImpersonat // Set the proxyuser settings so that the user who is running the Drillbits/MiniDfs can impersonate other users. dfsConf.set(String.format("hadoop.proxyuser.%s.hosts", processUser), "*"); dfsConf.set(String.format("hadoop.proxyuser.%s.groups", processUser), "*"); + + // It isn't clear exactly when or why the following reinitialisation is + // needed, but without it the test subclasses of this class may crash + // when run in the GitHub CI with Mini DFS stating "Running in secure + // mode, but config doesn't have a keytab". + dfsConf.set("hadoop.security.authentication", "simple"); + UserGroupInformation.setConfiguration(dfsConf); } // Start the MiniDfs cluster diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestInboundImpersonation.java b/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestInboundImpersonation.java index 18b1684a93a..3a2bc8e9077 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestInboundImpersonation.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestInboundImpersonation.java @@ -92,6 +92,8 @@ public void selectChainedView() throws Exception { .go(); } adminClient.resetSystem(ExecConstants.IMPERSONATION_POLICIES_KEY); + } finally { + stopMiniDfsCluster(); } }