Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3717

Fix race condition in QueueChannelTests#testSimpleSendAndReceive()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.0.7, 4.1.4
    • Fix Version/s: 4.2 M1, 4.1.5
    • Component/s: Core
    • Labels:

      Description

      The test verification uses ArgumentCaptor on logger.debug(), but there is no guaranty that all those debugs are called in the desired order. It isn't predictable because we use channel.receive() from separate Thread, hence we can receive a Message (and therefore logger.debug("postReceive on channel '" + this + "', message: " + message)) before the invocation for logger.debug("postSend (sent=" + sent + ") on channel '" + this + "', message: " + message).

      Don't see reason to verify those logs in this test.

        Attachments

          Activity

            People

            Assignee:
            abilan Artem Bilan
            Reporter:
            abilan Artem Bilan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: