carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuchuanyin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CARBONDATA-2038) Java tests should use JUnit assertion instead of the Java native one
Date Wed, 17 Jan 2018 03:16:00 GMT

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

xuchuanyin updated CARBONDATA-2038:
-----------------------------------
    Summary: Java tests should use JUnit assertion instead of the Java native one  (was: Java
tests should use JUnit assertion instead of jvm native assert)

> 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
>
> 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)

Mime
View raw message