citrus: "Reply channel not set up yet" when 2 HTTP Citrus actions happen in parallel

Citrus Version 2.7.8

Expected behavior Test passes

Actual behavior Test fails

Test case description 2 logically identical async blocks with different test data, pseudo code:

async().actions(
  insert data 1 into DB,
  behaviour with HTTP receive() and respond() with HTTP 200 OK,
  DB check that a record with status "SUCCESS" exists for the test data 1
);

async().actions(
  insert data 2 into DB,
  behaviour with HTTP receive() and respond() with HTTP 200 OK,
  DB check that a record with status "SUCCESS" exists for the test data 2
);

SUT behavior:

  • SUT has a background job which is triggered every 5 sec (on TEST env)
  • The background job scans DB for new entries and starts processing them
  • SUT then does HTTP POST with this new data as payload to an external system (Citrus HTTP mock server)
  • The external system responds with some additional data (the mock replies with HTTP 200 OK)
  • When SUT receives this data, the processing is finished and SUT then stores a record with status SUCCESS into DB (Citrus checks that DB has this entry at the end of the async blocks)

Note: one async block alone works but 2 blocks cause a failure:

12:57:06,068 DEBUG on.DefaultCorrelationManager| Finding correlated object for 'citrus_message_id = '9a369286-4824-4d6c-9eac-0bb12308d19a''
12:57:06,068 DEBUG           citrus.RetryLogger| Reply channel not set up yet - retrying in 500ms

It seems that Citrus cannot find the right HTTP channel for sending a response.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23 (20 by maintainers)

Most upvoted comments

Hi @svettwer !

I had some spare time to implement a super-duper-small example SUT and a couple of Citrus tests which reproduce this bug: https://github.com/progaddict/citrus-multiple-async-blocks

I hope this will help you guys to fixie-wixie the bug super-duper-fast 😆