carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuchuanyin (JIRA)" <>
Subject [jira] [Created] (CARBONDATA-2035) Incorrect assert in code leads to tests failed
Date Tue, 16 Jan 2018 11:52:00 GMT
xuchuanyin created CARBONDATA-2035:

             Summary: Incorrect assert in code leads to tests failed
                 Key: CARBONDATA-2035
             Project: CarbonData
          Issue Type: Bug
          Components: build
    Affects Versions: 1.3.0
            Reporter: xuchuanyin
            Assignee: xuchuanyin
             Fix For: 1.3.0

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

This message was sent by Atlassian JIRA

View raw message