Skip to content
Discussion options

You must be logged in to vote

You cannot invoke the methods annotated with @incoming and @Outgoing like this. It is a protocol violation, and the messages are ignored (2 violations at least: no downstream, and no requests).

The test can be rewritten as:

    @Test
    void receive() throws InterruptedException {
        InMemorySource<String> messages = connector.source("messages");
        InMemorySink<String> sink = connector.sink("send");
        InMemorySink<Message> dataStream = connector.sink("data-stream");

    
        handler.send("hello");
        assertThat(sink.received().get(0).getPayload()).isEqualTo("hello");

        messages.send("hello-123");
        assertThat(dataStream.received().get(0).getPayload().

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hantsy
Comment options

You must be logged in to vote
0 replies
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