You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/05/27 16:49:00 UTC

[GitHub] [hbase] ndimiduk commented on a change in pull request #1293: HBASE-23970 TestUsersOperationsWithSecureHadoop fails when an existing ticket is present

ndimiduk commented on a change in pull request #1293:
URL: https://github.com/apache/hbase/pull/1293#discussion_r431290946



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/security/TestUsersOperationsWithSecureHadoop.java
##########
@@ -64,7 +65,15 @@
   private static String CLIENT_NAME;
 
   @BeforeClass
-  public static void setUp() throws Exception {
+  public static void checkAndSetUp() throws Exception {
+    // check localhost kerberos users
+    Process process = Runtime.getRuntime().exec(new String[]{"bash", "-c", "klist"});
+    boolean wait = process.waitFor(2, TimeUnit.SECONDS);
+    assertTrue("localhost exec klist timeout!", wait);
+    int ret = process.exitValue();
+    assertTrue("localhost have an existing ticket!",ret != 0);

Review comment:
       about about `assertNotEquals` instead?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org