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 (JIRA)" <ji...@apache.org> on 2018/01/18 03:34:00 UTC

[jira] [Closed] (CARBONDATA-2035) Incorrect assert in code leads to tests failed

     [ https://issues.apache.org/jira/browse/CARBONDATA-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

xuchuanyin closed CARBONDATA-2035.
----------------------------------
    Resolution: Duplicate

> Incorrect assert in code leads to tests failed
> ----------------------------------------------
>
>                 Key: CARBONDATA-2035
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2035
>             Project: CarbonData
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 1.3.0
>            Reporter: xuchuanyin
>            Assignee: xuchuanyin
>            Priority: Major
>             Fix For: 1.3.0
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Today I came across tests failure when I ran tests in Intellij Idea. The code was on the master branch, and it had not been modified after I fetched the latest code.
>  
> The failed test lies in `TestLoadDataGeneral.test("test load / insert / update with data more than 32000 bytes - dictionary_exclude")`.  It complains that `"DataLoad failure: there is an unexpected error: null" did not contain "Dataload failure: DataLoad failed, String size cannot exceed 32000 bytes"`.
>  
> After I study the code, I find out that in `NonDictionaryFieldConverterImpl#line74 and #line77`, carbondata use an assert to raise the exception. But the exception is not thrown when I debug this tests. After some research, I found that the tests will success only if I enable `-ea` option. (run -> Edit configurations. Configuration -> VM parameters)
> By default, the "VM parameters" is empty and `-ea` is disabled, so the assert sentence in code will not come into effect, thus causing this problem.
> In conclusion, carbondata should not detect&throw exception in this way, we need to correct it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)