Skip to content

AmqpOutboundEndpoint not replaceable during integration tests? #3670

Discussion options

You must be logged in to vote

It is a bug, but not on the framework side.
It is just a misunderstanding of Spring Integration concepts:

@Bean(PARSED_DATA_STREAM_ENDPOINT)
public MessageHandler parsedDataStreamOut() {

This is not an endpoint to consume messages from the channel. This is a handler to process messages in that endpoint.
The goal of that MockIntegrationContext is still keep your flow as is, but replace message handlers exactly in the endpoints, so we don't do heavy logic with low-level resource.

Your mistake that you indeed try to replace a MessageHandler bean with the mock. While that error and docs states clearly that we have to call exactly an endpoint and replace exactly its MessageHandler with our mock.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@artembilan
Comment options

@stormsensorbrian
Comment options

@artembilan
Comment options

@stormsensorbrian
Comment options

@artembilan
Comment options

Answer selected by stormsensorbrian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants