[
https://issues.apache.org/jira/browse/OOZIE-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472742#comment-13472742
]
Robert Kanter commented on OOZIE-1016:
--------------------------------------
Just to clarify, there are two problems here:
1) Tests that use junit methods in a new thread basically ignore the junit
methods
2) Those three tests are failing; they all seem to be related to XML
validation.
> Tests that use junit assert or fail in a new thread report success when they
> are actually failing
> -------------------------------------------------------------------------------------------------
>
> Key: OOZIE-1016
> URL: https://issues.apache.org/jira/browse/OOZIE-1016
> Project: Oozie
> Issue Type: Bug
> Components: tests
> Reporter: Robert Kanter
> Priority: Minor
>
> These three tests create a new thread and use junit methods (e.g.
> assertTrue(), fail(), etc). These tests report success even when they should
> be failing, which can be seen by looking in the log output.
> They all have something like this:
> {code}
> Thread testThread = new Thread() {
> public void run() {
> try {
> do some stuff
> assertTrue(something);
> ...
> {code}
> These are the three tests that do this:
> 1) {{org.apache.oozie.cli.TestValidation.testTimeout}}
> 2) {{org.apache.oozie.service.TestSchemaService.testWfSchemaFailure}}
> 3)
> {{org.apache.oozie.workflow.lite.TestLiteWorkflowAppParser.testWfValidationFailure}}
> All these tests are actually failing.
> The output from the first one is this:
> {code}
> Exception in thread "Thread-1" junit.framework.AssertionFailedError:
> expected:<-1> but was:<0> at
> junit.framework.Assert.fail(Assert.java:50)
> at junit.framework.Assert.failNotEquals(Assert.java:287)
> at junit.framework.Assert.assertEquals(Assert.java:67)
> at junit.framework.Assert.assertEquals(Assert.java:199)
> at junit.framework.Assert.assertEquals(Assert.java:205)
> at org.apache.oozie.cli.TestValidation$1.run(TestValidation.java:51)
> {code}
> The second one has this:
> {code}
> Exception in thread "Thread-132" junit.framework.AssertionFailedError:
> Expected to catch ParseException but didn't encounter any at
> junit.framework.Assert.fail(Assert.java:50)
> at
> org.apache.oozie.service.TestSchemaService$1.run(TestSchemaService.java:148)
> {code}
> And the third one has this:
> {code}
> Exception in thread "Thread-132" junit.framework.AssertionFailedError:
> Expected to catch WorkflowException but didn't encounter any at
> junit.framework.Assert.fail(Assert.java:50)
> at
> org.apache.oozie.workflow.lite.TestLiteWorkflowAppParser$1.run(TestLiteWorkflowAppParser.java:345)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira