[
https://issues.apache.org/jira/browse/DRILL-5730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330032#comment-16330032
]
ASF GitHub Bot commented on DRILL-5730:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1045#discussion_r162246792
--- Diff: exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
---
@@ -58,23 +55,24 @@
import com.google.common.collect.ImmutableList;
import com.google.common.io.Resources;
-public class PlanningBase extends ExecTest{
- //private static final org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(PlanningBase.class);
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
--- End diff --
Suggestion. Do not depend on mocking in test. Design code so it works well
in tests without mocks. Resort to mocks only when absolutely necessary. That
is, we should be trying to do LESS mocking, not MORE.
This way, the same test code can be used in tools, ad-hoc tests and so on
without the JUnit machinery.
This is a philosophical discussion, and one that should have input from
more of the team.
> Fix Unit Test failures on JDK 8 And Some JDK 7 versions
> -------------------------------------------------------
>
> Key: DRILL-5730
> URL: https://issues.apache.org/jira/browse/DRILL-5730
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Timothy Farkas
> Assignee: Timothy Farkas
> Priority: Major
>
> Tests fail on JDK 8 and oracle JDK 7 on my mac
> Failed tests:
> TestMetadataProvider.tables:153 expected:<OK> but was:<FAILED>
> TestMetadataProvider.tablesWithTableNameFilter:212 expected:<OK> but
> was:<FAILED>
> TestMetadataProvider.tablesWithSystemTableFilter:187 expected:<OK> but
> was:<FAILED>
> TestMetadataProvider.tablesWithTableFilter:176 expected:<OK> but
> was:<FAILED>
> Tests in error:
> TestInfoSchema.selectFromAllTables » UserRemote SYSTEM ERROR:
> URISyntaxExcepti...
> TestCustomUserAuthenticator.positiveUserAuth » UserRemote SYSTEM ERROR:
> URISyn...
> TestCustomUserAuthenticator.positiveUserAuthAfterNegativeUserAuth »
> UserRemote
> TestViewSupport.infoSchemaWithView:350->BaseTestQuery.testRunAndReturn:344
> » Rpc
> TestParquetScan.testSuccessFile:58->BaseTestQuery.testRunAndReturn:344 »
> Rpc o...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)