You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by xuchuanyin <gi...@git.apache.org> on 2018/02/23 12:43:58 UTC

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

GitHub user xuchuanyin opened a pull request:

    https://github.com/apache/carbondata/pull/1994

    [CARBONDATA-1114][Tests] Fix bugs in tests in wondows env

    Fixed bugs in tests that will cause failure in windows env.
    
    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [x] Any interfaces changed?
     `NO`
     - [x] Any backward compatibility impacted?
      `NO`
     - [x] Document update required?
     `NO`
     - [x] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
     `NO, only fixed failed tests in windows`
            - How it is tested? Please attach test report.
    `Tested in local machine`
            - Is it a performance related change? Please attach the performance test report.
    `NO`
            - Any additional information to help reviewers in testing this change.
           
     - [x] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
    `Not related`


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xuchuanyin/carbondata windows_compatible

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1994.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1994
    
----
commit 9d7dad0ac120785547e2e5bae5211a1b9dc006c3
Author: xuchuanyin <xu...@...>
Date:   2018-02-13T07:55:38Z

    Fix bugs in tests
    
    Fixed bugs in tests that will cause failure in windows env

----


---

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1994#discussion_r170244470
  
    --- Diff: integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/booleantype/BooleanDataTypesInsertTest.scala ---
    @@ -555,7 +556,7 @@ class BooleanDataTypesInsertTest extends QueryTest with BeforeAndAfterEach with
     
         sql(
           s"""
    -         | LOAD DATA LOCAL INPATH '${storeLocation}'
    +         | LOAD DATA LOCAL INPATH '${FileFactory.getUpdatedFilePath(storeLocation)}'
    --- End diff --
    
    FYI:
    In windows env, path like 'D:\01_carbon' will cause problem, because it will treat “\0”as a single character '\0'.


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2631/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3860/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3849/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2644/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3850/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3875/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2625/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2628/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    LGTM


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    retest this please


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3889/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2615/



---

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1994#discussion_r170244618
  
    --- Diff: processing/src/test/java/org/apache/carbondata/lcm/locks/LocalFileLockTest.java ---
    @@ -65,7 +65,7 @@
     
         Assert.assertTrue(localLock1.unlock());
         Assert.assertTrue(localLock2.lock());
    -
    +    Assert.assertTrue(localLock2.unlock());
    --- End diff --
    
    FYI:
    Unlock this file otherwise deleting the file will cause failure.


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3874/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3655/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3632/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by chenliang613 <gi...@git.apache.org>.
Github user chenliang613 commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    retest this please


---

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1994#discussion_r170244941
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/DeleteLoadFolders.java ---
    @@ -188,8 +188,11 @@ public static boolean deleteLoadFoldersFromFileSystem(
                   LOGGER.info("Info: Deleted the load " + oneLoad.getLoadName());
                 }
               } finally {
    -            segmentLock.unlock();
    -            LOGGER.info("Info: Segment lock on segment:" + oneLoad.getLoadName() + " is released");
    +            if (segmentLock.isLocked()) {
    --- End diff --
    
    FYI:
    Only unlock if we lock it successfully, otherwise this will cause failure in windows.


---

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1994#discussion_r170245277
  
    --- Diff: core/src/test/java/org/apache/carbondata/core/carbon/datastorage/filesystem/store/impl/DFSFileReaderImplUnitTest.java ---
    @@ -50,21 +49,21 @@
         file = new File("Test.carbondata");
         fileWithEmptyContent = new File("TestEXception.carbondata");
     
    -    if (!file.exists()) try {
    -      file.createNewFile();
    -    } catch (IOException e) {
    -      e.printStackTrace();
    +    if (file.exists()) {
    +      file.delete();
         }
         if (!fileWithEmptyContent.exists()) try {
           fileWithEmptyContent.createNewFile();
         } catch (IOException e) {
           e.printStackTrace();
         }
         try {
    -      FileOutputStream of = new FileOutputStream(file, true);
    +      FileOutputStream of = new FileOutputStream(file, false);
    --- End diff --
    
    FYI:
    Create a brand new file and write to it. Remember to close the stream, otherwise deleting/renaming the file will cause failure.


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3870/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3633/



---

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin closed the pull request at:

    https://github.com/apache/carbondata/pull/1994


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    merged into carbonstore branch


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2605/



---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3651/



---

[GitHub] carbondata pull request #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1994#discussion_r170245727
  
    --- Diff: core/src/test/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFileTest.java ---
    @@ -44,8 +45,8 @@
     
         @BeforeClass
         static public void setUp() {
    -        file = new File("Test.carbondata");
    -        dir = new File("Testdir.carbondata");
    +        file = new File("TestLocalCarbonFile");
    --- End diff --
    
    FYI:
    Previous file name is the same as that in other testcase and this will cause failure in windows env due to file corruption


---

[GitHub] carbondata issue #1994: [CARBONDATA-1114][Tests] Fix bugs in tests in window...

Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/1994
  
    retest this please


---