You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2022/03/09 15:41:00 UTC

[jira] [Commented] (HIVE-26021) Change integration tests under DBInstallBase to regular unit tests

    [ https://issues.apache.org/jira/browse/HIVE-26021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17503671#comment-17503671 ] 

Stamatis Zampetakis commented on HIVE-26021:
--------------------------------------------

Currently without any change the unit tests for standalone metastore modules take ~15 minutes and the so-called integration tests take ~2 minutes. There is no strong reason to keep the separation between the two. To make matters worse given that the IT tests are not run regularly currently they are broken for Oracle as shown below.

{noformat}
$ mvn test
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Hive Standalone Metastore 4.0.0-SNAPSHOT:
[INFO] 
[INFO] Hive Standalone Metastore .......................... SUCCESS [  0.863 s]
[INFO] Hive Standalone Metastore Common Code .............. SUCCESS [04:33 min]
[INFO] Hive Metastore Server .............................. SUCCESS [10:50 min]
[INFO] Hive Metastore Tools ............................... SUCCESS [  0.052 s]
[INFO] Hive Metastore Tools common libraries .............. SUCCESS [  6.395 s]
[INFO] Hive metastore benchmarks .......................... SUCCESS [  4.999 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15:37 min
[INFO] Finished at: 2022-03-09T16:28:41+01:00
[INFO] ------------------------------------------------------------------------
{noformat}


{noformat}
$ mvn verify -DskipITests=false -Dtest=nosuch
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hive.metastore.dbinstall.ITestMssql
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.133 s - in org.apache.hadoop.hive.metastore.dbinstall.ITestMssql
[INFO] Running org.apache.hadoop.hive.metastore.dbinstall.ITestMysql
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.008 s - in org.apache.hadoop.hive.metastore.dbinstall.ITestMysql
[INFO] Running org.apache.hadoop.hive.metastore.dbinstall.ITestPostgres
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.786 s - in org.apache.hadoop.hive.metastore.dbinstall.ITestPostgres
[INFO] Running org.apache.hadoop.hive.metastore.dbinstall.ITestOracle
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 47.768 s <<< FAILURE! - in org.apache.hadoop.hive.metastore.dbinstall.ITestOracle
[ERROR] install(org.apache.hadoop.hive.metastore.dbinstall.ITestOracle)  Time elapsed: 20.429 s  <<< FAILURE!
java.lang.AssertionError: expected:<0> but was:<1>

[INFO] Running org.apache.hadoop.hive.metastore.dbinstall.ITestDerby
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.886 s - in org.apache.hadoop.hive.metastore.dbinstall.ITestDerby
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   ITestOracle>DbInstallBase.install:31 expected:<0> but was:<1>
[INFO] 
[ERROR] Tests run: 10, Failures: 1, Errors: 0, Skipped: 0
{noformat}


> Change integration tests under DBInstallBase to regular unit tests
> ------------------------------------------------------------------
>
>                 Key: HIVE-26021
>                 URL: https://issues.apache.org/jira/browse/HIVE-26021
>             Project: Hive
>          Issue Type: Improvement
>          Components: Tests
>            Reporter: Stamatis Zampetakis
>            Priority: Major
>
> After HIVE-18588, some tests including those under [DBInstallBase|https://github.com/apache/hive/blob/1139c4b14db82a9e2316196819b35cfb713f34b5/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/DbInstallBase.java] class have been marked as integration tests mainly to keep the test duration low.
> Nowadays, Hive developers rarely run all tests locally so separating between integration tests and unit tests does not provide a clear benefit. The separation adds maintenance cost and makes their execution more difficult scaring people away.
> The goal of this issue is to change the tests under {{DBInstallBase}} from "integration" tests back to regular unit tests and run them as part of the standard maven test phase without any fancy arguments.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)