It almost appears that there might be some issue with mock endpoint resetting?
On Wed, Oct 1, 2008 at 12:02 PM, Mick Knutson <[EMAIL PROTECTED]>wrote: > I am going crazy here (literally). > > This is all I know at this point. > > If I use this method exacly as I have it (endpoint names), then all my > tests pass as expected. But if I change anything in the endpoint names, even > to be mock:success, verse mock:success1 then several of my tests fail with > messages not getting routed correctly: > > *public void testCreateInvalidChangeRequest(String > inputDestinationURI, > String messageInputBody, > String messageOutputBody > ) > throws Exception { > > MockEndpoint mockFailureEndpoint = getMockEndpoint("mock:failed1 > "); > MockEndpoint mockSuccessEndpoint = getMockEndpoint("mock:success1 > "); > > mockFailureEndpoint.expectedBodiesReceived(messageInputBody); > mockFailureEndpoint.expectedMessageCount(1); > mockSuccessEndpoint.expectedMessageCount(0); > > try { > camelContext.addRoutes(new RouteBuilder() { > public void configure() throws Exception { > from("direct:start1") > .errorHandler(deadLetterChannel("mock:failed1 > ")) > .process(changeRequestProcessor) > .to("mock:success1"); > } > }); > > producerTemplate.sendBody("direct:start1", messageInputBody); > > Assert.fail("Should have thrown a RuntimeCamelException"); > } catch (RuntimeCamelException e) { > //assertIsInstanceOf(e, IllegalArgumentException.class); > assertIsInstanceOf(e, RuntimeCamelException.class); > } > > testMocksAreValid(); > > MockEndpoint.assertIsSatisfied(mockFailureEndpoint, > mockSuccessEndpoint); > > } > * > > I have attached my basetest, and this test in question as well. > -- --- Thank You… Mick Knutson BASE Logic, inc. (415) 354-4215 Website: http://baselogic.com Blog: http://baselogic.com/blog BLiNC Magazine: http://blincmagazine.com Linked IN: http://linkedin.com/in/mickknutson DJ Mick: http://djmick.com MySpace: http://myspace.com/mickknutson Vacation Rental: http://tahoe.baselogic.com