You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Liang Chen (JIRA)" <ji...@apache.org> on 2018/01/18 08:47:00 UTC

[jira] [Resolved] (CARBONDATA-2038) Java tests should use JUnit assertion instead of the Java native one

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

Liang Chen resolved CARBONDATA-2038.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.3.0

> Java tests should use JUnit assertion instead of the Java native one
> --------------------------------------------------------------------
>
>                 Key: CARBONDATA-2038
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2038
>             Project: CarbonData
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 1.3.0
>            Reporter: xuchuanyin
>            Assignee: xuchuanyin
>            Priority: Major
>             Fix For: 1.3.0
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> When I was working on CARBONDATA-2035, I noticed that some tests in our project use Java native assert as assertion. This may cause problems if developers run tests from their IDE and don't enable the `-ea` parameter for the JVM – The assertion will be skipped and always be true.
>  
> We should rely on JUnit assertion instead of the Java native assertion as its behavior is not affected by the JVM parameter.
>  
> Please notice that in scala tests, we use scalatests framework. The scalatests also provides an `assert` that hides the one in scala native. So there will be no problem if we use assert in scala tests. Please refer to [this| [http://www.scalatest.org/user_guide/using_assertions]] to get more information.



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