edgent-dev 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] (QUARKS-181) Create globalization tests for connectors
Date Thu, 26 May 2016 20:17:12 GMT

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

ASF GitHub Bot commented on QUARKS-181:
---------------------------------------

Github user dlaboss commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/123#discussion_r64813201
  
    --- Diff: connectors/file/src/test/java/quarks/test/connectors/file/FileStreamsGlobalTest.java
---
    @@ -0,0 +1,48 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +  http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +package quarks.test.connectors.file;
    +
    +import org.junit.Test;
    +
    +/**
    + * FileStreams connector globalization tests.
    + */
    +public class FileStreamsGlobalTest extends FileStreamsTest {
    +
    +    String[] globalLines = new String[] {
    +            "學而時習之",
    +            "不亦說乎"
    +    };
    +
    +    @Test
    +    public void testGlobalTextFileReader() throws Exception {
    --- End diff --
    
    The global strings are nicely isolated and the test code is nicely reused.  However needing
to override all of the methods of the base/standard class seems unfortunate.  Can that be
avoided / simplified by something along the lines of the following?
    ```
    String[] stdLines = new String[] {  // keep the original code
      ...
    }
    
    public String[] getLines() { return stdLines; }  // override in the global test
    
    public void testFoo() {  // orig signature
        // orig code String[] lines = stdLines;
        String[] lines = getLines();  // new code
        ... // rest of orig code
    }
    ```


> Create globalization tests for connectors
> -----------------------------------------
>
>                 Key: QUARKS-181
>                 URL: https://issues.apache.org/jira/browse/QUARKS-181
>             Project: Quarks
>          Issue Type: Test
>          Components: Test
>            Reporter: Queenie Ma
>            Assignee: Queenie Ma
>
> Currently, there are no tests for globalization (i.e., supporting character sets other
than English). To round out our existing tests, these tests should be added.
> bq. Java uses Unicode as its character set when running, so the only testing that would
be required is when writing/reading out tuples from streams to external systems. So the only
tests that make sense would be tests for connectors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message