Results 1 to 2 of 2

Thread: TestExecutionListener

  1. #1
    Join Date
    Mar 2008
    Posts
    3

    Default TestExecutionListener

    I've recently started playing around with Spring Integration and have run into a slight problem unit testing the message bus setup from and end-to-end perspective using JUnit 4.4 and Spring (2.5.2) Test Context Framework.

    Due to the asynchronous nature of Spring Integration, the Test Framework prematurely stops/tears down the test prior to the message bus completing the work flow. I.e. the message bus work flow execution is longer running than the test case execution.

    Is there any plan to provide/include MessageBusTestExecutionListener as a part of the Spring Integration Project that ensures the unit test spanning the end-to-end work flow of the message bus?

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    This is a very important issue indeed. If you check out the Spring Integration tests, you will notice that several of them use synchronization mechanisms such as creating a CountDownLatch and then calling await(..) from within the test method.

    Obviously that is somewhat crude and not an acceptable solution for truly non-invasive "integration" tests. Therefore, we will be adding a testing framework (likely a separate jar: spring-integration-test.jar).

    I have just created the initial Jira issue for this: http://jira.springframework.org/browse/INT-144

    -Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •