drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5832) Migrate OperatorFixture to use SystemOptionManager rather than mock
Date Mon, 16 Oct 2017 18:11:00 GMT

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

ASF GitHub Bot commented on DRILL-5832:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/970#discussion_r144924491
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
---
    @@ -184,25 +183,26 @@ public void testAllScalarTypes() throws Exception {
     
         try {
           // read all of the types with the complex reader
    -      test(String.format("alter session set %s = true", ExecConstants.PARQUET_NEW_RECORD_READER));
    +      alterSession(ExecConstants.PARQUET_NEW_RECORD_READER, true);
    --- End diff --
    
    Good point. Here, I was not changing the semantics of the test; rather just ensuring that
the tests are deterministic in doing what they already did. Presumably the test author knew
which reader to use for which test. In fact, the fact that the tests now pass indicates that
the proper reader is used (or, at least, the wrong reader is not used...)


> Migrate OperatorFixture to use SystemOptionManager rather than mock
> -------------------------------------------------------------------
>
>                 Key: DRILL-5832
>                 URL: https://issues.apache.org/jira/browse/DRILL-5832
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.12.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>             Fix For: 1.12.0
>
>
> The {{OperatorFixture}} provides structure for testing individual operators and other
"sub-operator" bits of code. To do that, the framework provides mock network-free and server-free
versions of the fragment context and operator context.
> As part of the mock, the {{OperatorFixture}} provides a mock version of the system option
manager that provides a simple test-only implementation of an option set.
> With the recent major changes to the system option manager, this mock implementation
has drifted out of sync with the system option manager. Rather than upgrading the mock implementation,
this ticket asks to use the system option manager directly -- but configured for no ZK or
file persistence of options.
> The key reason for this change is that the system option manager has implemented a sophisticated
way to handle option defaults; it is better to leverage that than to provide a mock implementation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message