You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Paul-Emmanuel Faidherbe (Created) (JIRA)" <ji...@apache.org> on 2012/01/19 11:20:41 UTC
[jira] [Created] (CAMEL-4919) Testing headers in multiple messages
Testing headers in multiple messages
-------------------------------------
Key: CAMEL-4919
URL: https://issues.apache.org/jira/browse/CAMEL-4919
Project: Camel
Issue Type: Improvement
Components: camel-test
Affects Versions: 2.9.0
Reporter: Paul-Emmanuel Faidherbe
Priority: Minor
The need is something similar to expectedBodiesReceivedInAnyOrder applied to headers :
I know that a given endpoint will receive 3 messages in any order, and I need to test ONE header in each of these messages.
I wrote :
getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "001.zip");
getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "002.zip");
getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "003.zip");
for the route :
for("file://filesToBeZipped/").to("bean:my.bean.ZipperBean").log("Zipped : ...");
The endpoint effectively received the three messages (the results of three ZIP operations) but the test failed saying that the first message header was "003.zip" and not the expected "001.zip".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4919) Testing headers in multiple
messages
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407859#comment-13407859 ]
Claus Ibsen commented on CAMEL-4919:
------------------------------------
You need a expectedHeadersReceivedInAnyOrder(key, values...)
> Testing headers in multiple messages
> -------------------------------------
>
> Key: CAMEL-4919
> URL: https://issues.apache.org/jira/browse/CAMEL-4919
> Project: Camel
> Issue Type: Improvement
> Components: camel-test
> Affects Versions: 2.9.0
> Reporter: Paul-Emmanuel Faidherbe
> Priority: Minor
> Labels: headers, messages, multiple
>
> The need is something similar to expectedBodiesReceivedInAnyOrder applied to headers :
> I know that a given endpoint will receive 3 messages in any order, and I need to test ONE header in each of these messages.
> I wrote :
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "001.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "002.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "003.zip");
> for the route :
> for("file://filesToBeZipped/").to("bean:my.bean.ZipperBean").log("Zipped : ...");
> The endpoint effectively received the three messages (the results of three ZIP operations) but the test failed saying that the first message header was "003.zip" and not the expected "001.zip".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-4919) Testing headers in multiple messages
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-4919.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.11
There is now a new expectedHeaderValuesReceivedInAnyOrder on mock endpoint
> Testing headers in multiple messages
> -------------------------------------
>
> Key: CAMEL-4919
> URL: https://issues.apache.org/jira/browse/CAMEL-4919
> Project: Camel
> Issue Type: Improvement
> Components: camel-test
> Affects Versions: 2.9.0
> Reporter: Paul-Emmanuel Faidherbe
> Assignee: Claus Ibsen
> Priority: Minor
> Labels: headers, messages, multiple
> Fix For: 2.11
>
>
> The need is something similar to expectedBodiesReceivedInAnyOrder applied to headers :
> I know that a given endpoint will receive 3 messages in any order, and I need to test ONE header in each of these messages.
> I wrote :
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "001.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "002.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "003.zip");
> for the route :
> for("file://filesToBeZipped/").to("bean:my.bean.ZipperBean").log("Zipped : ...");
> The endpoint effectively received the three messages (the results of three ZIP operations) but the test failed saying that the first message header was "003.zip" and not the expected "001.zip".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-4919) Testing headers in multiple messages
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-4919:
----------------------------------
Assignee: Claus Ibsen
> Testing headers in multiple messages
> -------------------------------------
>
> Key: CAMEL-4919
> URL: https://issues.apache.org/jira/browse/CAMEL-4919
> Project: Camel
> Issue Type: Improvement
> Components: camel-test
> Affects Versions: 2.9.0
> Reporter: Paul-Emmanuel Faidherbe
> Assignee: Claus Ibsen
> Priority: Minor
> Labels: headers, messages, multiple
>
> The need is something similar to expectedBodiesReceivedInAnyOrder applied to headers :
> I know that a given endpoint will receive 3 messages in any order, and I need to test ONE header in each of these messages.
> I wrote :
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "001.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "002.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile", "003.zip");
> for the route :
> for("file://filesToBeZipped/").to("bean:my.bean.ZipperBean").log("Zipped : ...");
> The endpoint effectively received the three messages (the results of three ZIP operations) but the test failed saying that the first message header was "003.zip" and not the expected "001.zip".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira