You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by trbvm <j2...@trbvm.com> on 2016/02/08 17:45:37 UTC

mock not working if id too long

Hi guys,

I'm observing strange behaviour in tests, where I've used to use verbose ids
for routes and processing steps to be able to mock them in tests with
weaveById method. But it seems to me, if id is longer then 18 chars, then
the step in route will not be mocked or, at least not properly mocked.

Can anyone confirm this? Does camel trim ids? At least, in log they are
trimmed. In example below the id should be abcdefgeleader-selection. I
thought, it's just readability issue, but after shortening ids, my test
became green.


Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                       
Elapsed (ms)
[abcdefgeleader-sel] [abcdefgeleader-sel] [file://in?moveFailed=error] [       
50]




--
View this message in context: http://camel.465427.n5.nabble.com/mock-not-working-if-id-too-long-tp5777381.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: mock not working if id too long

Posted by trbvm <j2...@trbvm.com>.
I'm sorry, I could not reproduce it anymore



--
View this message in context: http://camel.465427.n5.nabble.com/mock-not-working-if-id-too-long-tp5777381p5777455.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: mock not working if id too long

Posted by Claus Ibsen <cl...@gmail.com>.
You need to add camel-mail to the classpath

On Tue, Feb 9, 2016 at 11:33 AM, trbvm <j2...@trbvm.com> wrote:
> Ok, then can you please explain why this  test <http://pastebin.com/7sLCEjeW>
> is not working?
>
> http://pastebin.com/7sLCEjeW
>
> I'm getting
>
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> sendmailroute_0123456789_0123456789 at: >>>
> To[smtp://localhost?to=bar@example.com] <<< in route:
> Route(sendmailroute_0123456789_0123456789)[[From[direct:star... because of
> Failed to resolve endpoint: smtp://localhost?to=bar%40example.com due to: No
> component found with scheme: smtp
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/mock-not-working-if-id-too-long-tp5777381p5777453.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: mock not working if id too long

Posted by trbvm <j2...@trbvm.com>.
Ok, then can you please explain why this  test <http://pastebin.com/7sLCEjeW>  
is not working?

http://pastebin.com/7sLCEjeW

I'm getting

org.apache.camel.FailedToCreateRouteException: Failed to create route
sendmailroute_0123456789_0123456789 at: >>>
To[smtp://localhost?to=bar@example.com] <<< in route:
Route(sendmailroute_0123456789_0123456789)[[From[direct:star... because of
Failed to resolve endpoint: smtp://localhost?to=bar%40example.com due to: No
component found with scheme: smtp



--
View this message in context: http://camel.465427.n5.nabble.com/mock-not-working-if-id-too-long-tp5777381p5777453.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: mock not working if id too long

Posted by Claus Ibsen <cl...@gmail.com>.
That is just the output of that message history table that limits to a
20 chars in those columns.

There is no id limit in Camel.

On Mon, Feb 8, 2016 at 5:45 PM, trbvm <j2...@trbvm.com> wrote:
> Hi guys,
>
> I'm observing strange behaviour in tests, where I've used to use verbose ids
> for routes and processing steps to be able to mock them in tests with
> weaveById method. But it seems to me, if id is longer then 18 chars, then
> the step in route will not be mocked or, at least not properly mocked.
>
> Can anyone confirm this? Does camel trim ids? At least, in log they are
> trimmed. In example below the id should be abcdefgeleader-selection. I
> thought, it's just readability issue, but after shortening ids, my test
> became green.
>
>
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------
> RouteId              ProcessorId          Processor
> Elapsed (ms)
> [abcdefgeleader-sel] [abcdefgeleader-sel] [file://in?moveFailed=error] [
> 50]
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/mock-not-working-if-id-too-long-tp5777381.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2