veghlaci05 commented on code in PR #4328:
URL: https://github.com/apache/hive/pull/4328#discussion_r1196136476


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java:
##########
@@ -117,11 +117,11 @@ public void testTimeout() throws Exception {
 
   @Test
   public void testResetTimeout() throws Exception {
-    HMSHandler.testTimeoutValue = 250;
     String dbName = "db";
 
     // no timeout before reset
     client.dropDatabase(dbName, true, true);
+    HMSHandler.testTimeoutValue = 250;

Review Comment:
   Originally the low timeout value was set at the beginning of the test. 
Normally it is high enough that `client.dropDatabase(dbName, true, true);` 
won't fail, but `client.createDatabase(db);` will do. However, if the 
network/DB is very slow, even `client.dropDatabase(dbName, true, true);` can 
fail causing the whole test to fail. Since the default value of the timeout is 
-1 (no timout) I moved the lowering the value after the dropdatabase call, so 
now it is no longer sensitive to the environment.



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