You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/06/07 06:57:56 UTC

[GitHub] [hudi] xushiyan commented on a change in pull request #3043: [HUDI-1950] Move TestHiveMetastoreBasedLockProvider to functional

xushiyan commented on a change in pull request #3043:
URL: https://github.com/apache/hudi/pull/3043#discussion_r646316618



##########
File path: hudi-sync/hudi-hive-sync/src/test/java/org/apache/hudi/hive/functional/TestHiveMetastoreBasedLockProvider.java
##########
@@ -54,39 +54,33 @@
  * /metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L2892
  * Unless this is set, we cannot use HiveMetastore server in tests for locking use-cases.
  */
-public class TestHiveMetastoreBasedLockProvider {
+@Tag("functional")
+public class TestHiveMetastoreBasedLockProvider extends HiveSyncFunctionalTestHarness {
 
-  private static Connection connection;
-  private static LockComponent lockComponent = new LockComponent(LockType.EXCLUSIVE, LockLevel.TABLE, "testdb");
-  private static LockConfiguration lockConfiguration;
+  private static final String TEST_DB_NAME = "testdb";
+  private static final String TEST_TABLE_NAME = "testtable";
+  private LockComponent lockComponent = new LockComponent(LockType.EXCLUSIVE, LockLevel.TABLE, TEST_DB_NAME);
+  private LockConfiguration lockConfiguration;
 
-  @BeforeAll
-  public static void init() throws Exception {
-    HiveTestUtil.setUp();
-    createHiveConnection();
-    connection.createStatement().execute("create database if not exists testdb");

Review comment:
       creating the db is not required for the tests to pass




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