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

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
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 <xuchuanyin@...>
Date:   2018-02-13T07:55:38Z

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

----


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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'.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user chenliang613 commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
12