You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Evan Wong (Jira)" <ji...@apache.org> on 2021/01/13 20:13:00 UTC
[jira] [Comment Edited] (DRILL-7842) Fix BaseTestInheritance test
case
[ https://issues.apache.org/jira/browse/DRILL-7842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17264395#comment-17264395 ]
Evan Wong edited comment on DRILL-7842 at 1/13/21, 8:12 PM:
------------------------------------------------------------
Hey, I'm very much a newcomer and I would definitely like to take up this task, but I have a concern. According to documentation in BaseTestInheritance, the tests do not need to be fixed as they are found as long as there is "test" in their names.
^// Get all tests that are not inherited from BaseTest^
^Set<String> testClasses = reflections.getSubTypesOf(Object.class).stream()^
^.filter(c -> !c.isInterface())^
^.filter(c -> c.getSimpleName().toLowerCase().contains("test"))^
^.filter(c -> Arrays.stream(c.getDeclaredMethods())^
^.anyMatch(m -> m.getAnnotation(Test.class) != null))^
^.filter(c -> !baseTestInheritors.contains(c))^
^.map(Class::getName)^
^.collect(Collectors.toSet());^
In this case, would changing the basetestinheritance to, for example, _TestInheritanceFromBaseClass,_ be sufficient?
was (Author: yaybeno):
Hey, I'm very much a newcomer and I would definitely like to take up this task, but I have a concern. According to documentation in BaseTestInheritance, the tests do not need to be fixed as they are found as long as there is "test" in their names.
^// Get all tests that are not inherited from BaseTest^
^Set<String> testClasses = reflections.getSubTypesOf(Object.class).stream()^
^.filter(c -> !c.isInterface())^
^.filter(c -> c.getSimpleName().toLowerCase().contains("test"))^
^.filter(c -> Arrays.stream(c.getDeclaredMethods())^
^.anyMatch(m -> m.getAnnotation(Test.class) != null))^
^.filter(c -> !baseTestInheritors.contains(c))^
^.map(Class::getName)^
^.collect(Collectors.toSet());^
In this case, would changing the basetestinheritance to, for example, _TestInheritanceFromBaseClass,_ be sufficient?
> Fix BaseTestInheritance test case
> ---------------------------------
>
> Key: DRILL-7842
> URL: https://issues.apache.org/jira/browse/DRILL-7842
> Project: Apache Drill
> Issue Type: Test
> Components: Tools, Build & Test
> Affects Versions: 1.18.0
> Reporter: Vitalii Diravka
> Priority: Trivial
> Fix For: Future
>
>
> *[Very minor, but can be good for newcomers]*
> BaseTestInheritance test is not running in maven test phase. It is due to naming. The only tests starting from _Test*_ are running.
> Need to rename it to _TestInheritanceFromBaseClass_ (for example) and fix tests, which are currently isn't inherited from the _BaseTest_ class:
> {code:java}
> [org.apache.drill.exec.physical.impl.scan.v3.schema.TestProjectedPath,
> org.apache.drill.exec.physical.impl.TestStackAnalyzer,
> org.apache.drill.exec.physical.resultSet.impl.TestProjectionFilter,
> org.apache.drill.exec.physical.resultSet.project.TestProjectedPath,
> org.apache.drill.exec.physical.impl.scan.v3.schema.TestDynamicSchemaFilter,
> org.apache.drill.exec.physical.impl.scan.v3.schema.TestSchemaTrackerDefined]
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)