This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch 1.21
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 6f130c4232518ff8b1ef4fd9911ca7ef613367b6
Author: James Turton <9107319+jntur...@users.noreply.github.com>
AuthorDate: Wed Aug 16 20:01:55 2023 +0200

    [MINOR UPDATE]: Fix Hadoop 3 impersonation test errors during CI runs 
(#2822)
    
    * Shut down MiniDFS cluster in TestInboundImpersonation.selectChainedView.
    
    * Ensure that MiniDFS is using simple auth in BaseTestImpersonation.
---
 .../org/apache/drill/exec/impersonation/BaseTestImpersonation.java | 7 +++++++
 .../apache/drill/exec/impersonation/TestInboundImpersonation.java  | 2 ++
 2 files changed, 9 insertions(+)

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 f1d471d09e..37ae508c37 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 @@ public class BaseTestImpersonation extends ClusterTest {
       // 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 18b1684a93..3a2bc8e907 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 class TestInboundImpersonation extends 
BaseTestImpersonation {
             .go();
       }
       adminClient.resetSystem(ExecConstants.IMPERSONATION_POLICIES_KEY);
+    } finally {
+      stopMiniDfsCluster();
     }
   }
 

Reply via email to