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/17 03:16:00 UTC
[jira] [Updated] (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 ]
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)