[ https://issues.apache.org/jira/browse/HIVE-23163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082542#comment-17082542 ]
Chinna Rao Lalam commented on HIVE-23163: ----------------------------------------- +1 > Class TrustDomainAuthenticationTest should be abstract > ------------------------------------------------------ > > Key: HIVE-23163 > URL: https://issues.apache.org/jira/browse/HIVE-23163 > Project: Hive > Issue Type: Bug > Reporter: Zhenyu Zheng > Assignee: Yikun Jiang > Priority: Major > Attachments: HIVE-23163.1.patch, HIVE-23163.2.patch, > HIVE-23163.3.patch > > > When running tests in pre-commit CI, the test parser will only identify test > classes start with 'Test' > [https://github.com/apache/hive/blob/d2163cbfb8bacf859fa8572e24c8533bb2dcb0f3/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/UnitTestPropertiesParser.java#L406] > But when running using `mvn test`, it will also parse classes such as > '*Test.java': > [http://maven.apache.org/plugins-archives/maven-surefire-plugin-2.12.4/examples/inclusion-exclusion.html] > so for: > [https://github.com/apache/hive/blob/d2163cbfb8bacf859fa8572e24c8533bb2dcb0f3/itests/hive-unit/src/test/java/org/apache/hive/service/auth/TrustDomainAuthenticationTest.java#L38] > it will also be included in the test, for example: > [https://builds.apache.org/view/H-L/view/Hive/job/Hive-linux-ARM-trunk/23/testReport/junit/org.apache.hive.service.auth/TrustDomainAuthenticationTest/testTrustedDomainAuthentication/] > This is because that class TrustDomainAuthenticationTest is actually a parent > class that does not have the parameters for init. The actual tests are its > children classes like the rest in > [https://builds.apache.org/view/H-L/view/Hive/job/Hive-linux-ARM-trunk/23/testReport/junit/org.apache.hive.service.auth/] > they will pass actuall parameters for init: > [https://github.com/apache/hive/blob/d2163cbfb8bacf859fa8572e24c8533bb2dcb0f3/itests/hive-unit/src/test/java/org/apache/hive/service/auth/TestTrustDomainAuthenticationBinary.java#L26] > > we can make this class abstract so that it won't be included when running > 'mvn test', like > [https://github.com/apache/hive/blob/d2163cbfb8bacf859fa8572e24c8533bb2dcb0f3/itests/hive-unit/src/test/java/org/apache/hive/jdbc/AbstractJdbcTriggersTest.java#L54] > > -- This message was sent by Atlassian Jira (v8.3.4#803005)