camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Shikov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-7409) Camel ZipIterator should not eat the IOException
Date Mon, 05 May 2014 16:16:15 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-7409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989663#comment-13989663
] 

Serge Shikov edited comment on CAMEL-7409 at 5/5/14 4:15 PM:
-------------------------------------------------------------

Willem, have you added corrupted zip file for testing? W/o it all tests passed as expected,
but if you add corrupted zip file, tests will fail, w/o any errors:

{code}
testSplitter(org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest)  Time elapsed:
2.186 sec  <<< FAILURE!
java.lang.AssertionError: mock://entry Received message count. Expected: <2> but was:
<3>
	at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1333)
	at org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:1315)
	at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:383)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:362)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:350)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:188)
	at org.apache.camel.test.junit4.CamelTestSupport.assertMockEndpointsSatisfied(CamelTestSupport.java:675)
	at org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest.testSplitter(ZipSplitterRouteIssueTest.java:39)

testSplitterWithWrongFile(org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest) 
Time elapsed: 11.211 sec  <<< FAILURE!
java.lang.AssertionError: mock://errors Received message count. Expected: <1> but was:
<0>
	at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1333)
	at org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:1315)
	at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:383)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:362)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:350)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:188)
	at org.apache.camel.test.junit4.CamelTestSupport.assertMockEndpointsSatisfied(CamelTestSupport.java:675)
	at org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest.testSplitterWithWrongFile(ZipSplitterRouteIssueTest.java:49)
{code}

Steps to reproduce: any file with .zip extension, or corrupted data.zip (in my tests I have
removed 1st 2 bytes from data.zip).


was (Author: cp1):
Willem, have you added corrupted zip file for testing? W/o it all tests passed as expected,
but if you add corrupted zip file, tests will fail, w/o any errors:

{code}
testSplitter(org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest)  Time elapsed:
2.186 sec  <<< FAILURE!
java.lang.AssertionError: mock://entry Received message count. Expected: <2> but was:
<3>
	at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1333)
	at org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:1315)
	at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:383)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:362)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:350)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:188)
	at org.apache.camel.test.junit4.CamelTestSupport.assertMockEndpointsSatisfied(CamelTestSupport.java:675)
	at org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest.testSplitter(ZipSplitterRouteIssueTest.java:39)

testSplitterWithWrongFile(org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest) 
Time elapsed: 11.211 sec  <<< FAILURE!
java.lang.AssertionError: mock://errors Received message count. Expected: <1> but was:
<0>
	at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1333)
	at org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:1315)
	at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:383)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:362)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:350)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:188)
	at org.apache.camel.test.junit4.CamelTestSupport.assertMockEndpointsSatisfied(CamelTestSupport.java:675)
	at org.apache.camel.dataformat.zipfile.ZipSplitterRouteIssueTest.testSplitterWithWrongFile(ZipSplitterRouteIssueTest.java:49)
{code}

> Camel ZipIterator should not eat the IOException
> ------------------------------------------------
>
>                 Key: CAMEL-7409
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7409
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.13.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.12.4, 2.13.1, 2.14.0
>
>
> If there are some thing wrong with the Zip file which is split by ZipIterator, we cannot
find any warning or exception from the camel route. We should not let ZipIterator eat up the
exception without do anything.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message