[ https://issues.apache.org/jira/browse/HIVE-19104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434319#comment-16434319 ]
Sahil Takiar commented on HIVE-19104: ------------------------------------- {quote} The purpose of the MetaStoreTestUtils is to allow easy metastore instance creation for tests and the user should not have to bother with details, like making the jdbc url independent {quote} Ok, then why do we just set {{javax.jdo.option.ConnectionURL}} inside {{MetaStoreTestUtils}} rather than doing the string replacement? Are there any tests that require a custom defined JDBC URL? If there are, can we just make separate helper methods for them in {{MetaStoreTestUtils}}. Another approach to find a way to properly parse the connection URL and extract out the database name, and then append the port number. However, I don't think there is a standardized way to parse JDBC URLs. A few other comments: Can the following code just be moved into a {{BeforeClass}} block? {code} if (conf == null) { conf = MetastoreConf.newMetastoreConf(); } {code} Why is {{MetastoreConf.newMetastoreConf(new Configuration(this.conf));}} necessary? Can't it just be {{MetastoreConf.newMetastoreConf(this.conf);}} > When test MetaStore is started with retry the instances should be independent > ----------------------------------------------------------------------------- > > Key: HIVE-19104 > URL: https://issues.apache.org/jira/browse/HIVE-19104 > Project: Hive > Issue Type: Improvement > Reporter: Peter Vary > Assignee: Peter Vary > Priority: Major > Attachments: HIVE-19104.2.patch, HIVE-19104.3.patch, HIVE-19104.patch > > > When multiple MetaStore instances are started with > {{MetaStoreTestUtils.startMetaStoreWithRetry}} currently they use the same > JDBC url, and warehouse directory. This can cause problem in the tests -- This message was sent by Atlassian JIRA (v7.6.3#76005)