> On Feb. 22, 2018, 4:45 p.m., Sahil Takiar wrote: > > so just to clarify, the creation of metastore instances is moving from the > > individual contructors to a `BeforeClass` method?
Thanks for the review! Yes! This is the main change in the patch - run start the metastore instances once per test class instead of once per test method. > On Feb. 22, 2018, 4:45 p.m., Sahil Takiar wrote: > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/MetaStoreClientTest.java > > Lines 18 (patched) > > <https://reviews.apache.org/r/65753/diff/1/?file=1963397#file1963397line18> > > > > random thought, should be move these into a package like > > `o.a.h.hive.metastore.client.api`? or does it need to be in this package? > > not a blocker It is certainly possible. There are a few patches currently in progress. After the dust settles we should revisit this too. > On Feb. 22, 2018, 4:45 p.m., Sahil Takiar wrote: > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/MetaStoreClientTest.java > > Lines 60 (patched) > > <https://reviews.apache.org/r/65753/diff/1/?file=1963397#file1963397line60> > > > > can this be `private` This is intentionally package private, which can be used when specific MetaStore configuration is needed for the given tests. For example: - TestTablesCreateDropAlterTruncate - TestDropPartitions If you have any idea how to do it in a better way, I am open for it (not entirely satisfied with this solution) Until that I added an extra comment > On Feb. 22, 2018, 4:45 p.m., Sahil Takiar wrote: > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/MetaStoreClientTest.java > > Lines 62 (patched) > > <https://reviews.apache.org/r/65753/diff/1/?file=1963397#file1963397line62> > > > > why are there multiple metastores that need to be started? is it for > > the embedded and remote metastore? since its a Parameterized test does > > BeforeClass / AfterClass not get run separately for each one? BeforeClass, AfterClass only run once for the whole test. I would prefer to run the start/stop once per parameter, but it is currently not possible. Readded the previous comment: // Needed until there is no junit release with @BeforeParam, @AfterParam (junit 4.13) // https://github.com/junit-team/junit4/commit/1bf8438b65858565dbb64736bfe13aae9cfc1b5a // Then we should remove our own copy - Peter ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65753/#review198121 ----------------------------------------------------------- On Feb. 22, 2018, 12:25 p.m., Peter Vary wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65753/ > ----------------------------------------------------------- > > (Updated Feb. 22, 2018, 12:25 p.m.) > > > Review request for hive, Marta Kuczora, Sahil Takiar, and Adam Szita. > > > Bugs: HIVE-18771 > https://issues.apache.org/jira/browse/HIVE-18771 > > > Repository: hive-git > > > Description > ------- > > For every class only 1 metastore is initialized for every configuration > Refactored tests, so it will have a common parent class which handles > initializations (Thanks Sahil for proposing it previously. You were right > after all :) ) > > > Diffs > ----- > > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/MetaStoreClientTest.java > PRE-CREATION > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/MetaStoreFactoryForTests.java > e723f60 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddAlterDropIndexes.java > d25b81e > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitions.java > f483ca8 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitionsFromPartSpec.java > 919ba78 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java > 31b3154 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java > cfec569 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java > c1c1c61 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java > e550bca > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestExchangePartitions.java > 3a06aec > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestFunctions.java > 1974399 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestGetListIndexes.java > 1db7adc > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestGetPartitions.java > 2c7f3fb > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestGetTableMeta.java > 7ede38f > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestListPartitions.java > 93bcd19 > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java > dbcc57e > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesGetExists.java > 0af873b > > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesList.java > 15bd6c6 > > > Diff: https://reviews.apache.org/r/65753/diff/1/ > > > Testing > ------- > > Run the affected tests > > > Thanks, > > Peter Vary > >