Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Nov 23, 2015
  1. INT-3984: UDP: OS Selected Server Port

    Allow UDP server port (and sender Ack port) to be selected by the operating system.
    Also fix multicast tests to run on all platforms.
    Change tests to use OS selected port.
  2. @artembilan

    INT-3895: Fix `MonitorTests` Race Condition

    artembilan committed with
    * `@Ignore` `DelayerUsageTests.testDelayWithCustomScheduler()` as very weak test. (We can consider it to remove at all: doesn't test anything from our side)
    * Add `LogAdjustingTestSupport` diagnostic to the `OutboundGatewayFunctionTests`
    Tentative commit to see more logs from Travis
    Additional diagnostics
    More STOMP Diagnostics
Commits on Nov 21, 2015
  1. INT-3896: JMX: Fix Double Router MBean Export

    Routers created by the `RouterFactoryBean` were not suppressed from being exported
    by the context exporter when an `IMBE` is present.
    Move the suppression logic to `postProcessAfterInitialization()` so the annotation on
    the bean created by the factory bean is detected. The annotation is not detected on
    the factory bean itself in `postProcessBeforeInitialization()`.
Commits on Nov 20, 2015
  1. @artembilan

    INT-3893: UnicastReceivingChannelAdapter: fix NPE

    artembilan committed with
    Send on the calling thread if the executor is shut down.
  2. @artembilan

    Fix one more STOMP WebSocket test race condition

    artembilan committed
    We need to wait for the **real** `UNSUBSCRIBE` from server before go ahead.
Commits on Nov 19, 2015
  1. @artembilan

    Fix WebSocket tests the same way as STOMP before

    artembilan committed
    See and its PullRequest
    Note: rework `StompIntegrationTests` logic to use SockJS Client (that was enabled on the server side before).
    This helps us to use `sessionId` which is as a `user` key on subscription phase.
    In case of Standard Tomcat WebSocket Client we end up with the race condition when both client and server uses the same
    `static` variable in the `WsSession` class, so we can't determine the server session correctly by the id on the client side.
    The subscribe/send/unsubscribe logic works well because we are based on the **web socket** for the session, independently of its id.
  2. @artembilan

    INT-3889: Fix AMQP PubSub Channel Test Race Cond.

    committed with artembilan
    The test case `pubSubLostConnectionTest` forces the connection closed and
    then sends another message. It is testing recovery.
    However, since the pub/sub queue is an auto-delete queue, we need to wait until
    the new consumer is established and the queue exists, before sending the message after the test.
    Otherwise, since the exchange is fanout, the message is simply dropped.
    Also set `@DirtiesContext` on other tests.
    Also remove non-tests.
    I have __not__ removed the diagnostics because I don't believe this addresses AMQP-543.
  3. @artembilan
  4. @artembilan

    INT-3888: Fix STOMP Test for Race Condition

    artembilan committed with
    Note sure yet what race condition we have in the `DefaultSubscriptionRegistry`,
    but that looks for me better to follow with the standard `SubscriptionRegistry.findSubscriptions()`
    to check subscription present, unless fail during `send()` because of `destinationLookup` early exit.
    Fix for the `StompServerIntegrationTests`
    Looks like we have to `reconnect()` for any `handleTransportError()` activity,
    otherwise we are just hang in the Reactor's TCP reconnect loop without freeing resources
    for other activities, e.g. start Embedded STOMP Broker.
    Increase `receive` timeout in case of wait for the Broker Start
Commits on Nov 18, 2015
  1. @artembilan

    INT-3861: Mail Namespace Support for userFlag

    committed with artembilan
    Allow the custom `userFlag` to be configured using the namespace.
    Polishing according PR comments
  2. @artembilan

    INT-3884: Outbound Gateway replyChannel in Chain

    committed with artembilan
    Previously, an outbound gateway within a chain allowed a `reply-channel` attribute
    but it was ignored. The gateway's output channel is set to send the message to
    the next element in the chain, or the chain's output channel if the gateway is
    the last element.
    Tighten the parser logic to detect and disallow a reply channel within a chain.
Commits on Nov 17, 2015
  1. @artembilan

    Prepare Master for 4.3

    committed with artembilan
    Reference to 4.3
    Refactor `what's new` for 4.3
Commits on Nov 16, 2015
  1. Fix JMX MonitorTests

    MessagingTemplate had no timeout and could hang the build.
    OnlyOneTrigger could fire before the message is sent; increase
    the poller receive timeout so the poller thread blocks until the message is sent.
  2. @spring-buildmaster
  3. @spring-buildmaster
  4. @artembilan

    INT-3823: Fix `EnableIntTests` Race Condition

    committed with artembilan
    The test stops the endpoint.
    The previous poller thread can 'steal' the `input` message, but since
    it is interrupted, it can't send the message to the `publishedChannel`.
    Add logic to wait until the previous poller has been interrupted in `receive()`.
    Increase the endpoint `receiveTimeout` to ensure the thread will be interrupted.
    Bump SF Version to 4.2.3
    Remove `TRACE` logging from the `EnableIntegrationTests` since we have the fix already
    Make some optimization around `@DirtiesContext`
Commits on Nov 14, 2015
  1. @artembilan
  2. @artembilan

    Fixes for Sporadic Test Failures

    artembilan committed with
    * `ClientWebSocketContainer`: add some synchronization to avoid race conditions:
    * `TomcatWebSocketTestServer`: convert to `0` port to rely on the OS resolution for `localPort`
    * Add `LogAdjustingTestSupport` for STOMP test
    * `SftpServerTests`: use `0` port to rely on the OS resolution for `localPort`
    * `ImapMailReceiver`, `OutboundGatewayFunctionTests` (JMS), `CachingClientConnectionFactoryTests`,
    `AsyncGatewayTests`, `AsyncMessagingTemplateTests`, `GatewayParserTests`, `PriorityChannelTests`, `AggregatorIntegrationTests`: increase timeout
    * `EnableIntegrationTests`: use `LogAdjustingTestSupport`
    * `FileOutboundChannelAdapterParserTests`: rework `Thread.sleep()` with `CountDownLatch`
    * `ConnectionToConnectionTests`: increase timeout and count iteration. Previously with `1sec` we may lose some events. And we can't just rely on the `10sec`,
    because the last iteration will be so long
    * `TcpOutboundGatewayTests`: `500ms` is so big timeout to wait for the `Exception` that in the high load environment we can yield to other Thread so long.
    Like in our case to `server` Thread to send the reply for us. Therefore decrease the Exception timeout to the `50ms` and increase server delay to `2sec`
    * `StompInboundChannelAdapterWebSocketIntegrationTests`: remove `@Qualifier("taskScheduler")` as a potential candidate to test against latest SF changes.
    We're fine with `SF-4.2.2` and it is just a test-case. So, I don't see reason to wait for their fix here.
    STOMP: `session = null` in adapters for any transportError
Commits on Nov 13, 2015
  1. @artembilan

    Upgrade to AMQP-1.5.2

    artembilan committed
    Add `@Qualifier("taskScheduler")` to the `StompInboundChannelAdapterWebSocketIntegrationTests`:
  2. @artembilan

    INT-3882: StompSession Reconnection Logic

    artembilan committed with
    Add reconnect support for the StompSession:
    * Introduce `recoveryInterval` for the `AbstractStompSessionManager`
    * Add reconnect scheduled task
    * Add handling of the `ConnectionLostException` into the `AbstractStompSessionManager`,
    as well as for the `StompInboundChannelAdapter` and `StompMessageHandler`
    * Cover adapters reconnection feature with tests
    * Documentation polishing
    Rework logic according PR comments
    * Make `StompMessageHandler` as a "lazy-load" for the connection
    * Add "direct" connect interaction for the `AbstractStompSessionManager`
    * Polishing tests
    Fix `StompAdaptersParserTests#testStompSessionManagerReconnect()` to use "fake" server port
    Address PR comments
    The further polishing
    Some further polishing
    * `AbstractStompSessionManager`: `reconnectFuture.cancel(true)` on each `scheduleReconnect()` to avoid something like "DDoS attack"
    * Add reconnect feature test for the `StompInboundChannelAdapterWebSocketIntegrationTests`, closing and then refreshing again the `serverContext`
  3. @artembilan

    INT-3885: Fix JMS Outbound Gateway Concurrency

    committed with artembilan
    Possible dropped reply, causing timeout.
    WARN org.springframework.integration.jms.JmsOutboundGateway#1.replyListener-1 jms.JmsOutboundGateway:1202
        - Failed to consume reply with correlationId 164a49bf-c41d-4c0b-b012-55deecf001d1_2
          java.lang.RuntimeException: No sender waiting for reply
    - Reproduced by running the test in a loop
    - Cleaned up test to aid debugging - capture a unique message at each stage
    - Added additional debug logging to th gateway
  4. @artembilan

    INT-3886: TCP Fix Socket Timeout: Raw Deserializer

    committed with artembilan
    An SO user reported a short message delivery when an NIO connection was timed out.
    See JIRA for link.
    We could not produce the problem with his deserializer but it did identify a problem
    with the standard `ByteArrayRawSerializer`.
    With NIO, socket timeouts were reported to the deserializer as a normal EOF (-1). This
    caused the raw serializer to emit a short message - it's signal for end of message is the
    socket closure.
    We can't treat a timeout as a normal EOF.
    If the socket is forcibly timed out due to no recent data, throw a `SocketTimeoutException` to
    the deserializer.
    Just in case the old behavior is being relied upon, a boolean has been added to restore that
    behavior. This is not recommended, as using timeout to delimit messages is not reliable.
    * Fix typos
    * Increase `MongoDbInboundChannelAdapterIntegrationTests` timeouts
    * Some code polishing
  5. @artembilan
Commits on Nov 12, 2015
  1. @artembilan
Commits on Nov 10, 2015
  1. Increase File Test Timeouts

  2. @artembilan

    INT-3871: Fix NPE in the JsonPropertyAccessor

    artembilan committed with
    **Cherry-pick to 4.1.x, 4.0.x, 3.0.x**
  3. Fix Stomp Test Race Condition

    Message producers are started in phase `Integer.MAX_INT / 2`.
    The test case has a stomp inbound adapter and an event producer.
    Since they are both in the same phase, the event producer can miss the `StompReceiptEvent`.
    Change the phase of the event producer to ensure it is started before other message producers.
Commits on Nov 9, 2015
  1. @artembilan

    MQTT: Possible NPE

    committed with artembilan
    Examining the code revealed a possible (but improbable) NPE.
    Checking the connection was disjoint from the publish; encapsulate the check within publish.
    Synchronize the connectionLost method so it can't null the client while it is being checked.
    Add `@SuppressWarnings("deprecation")` on the deprecated `connectIfNeeded()` usage.
  2. Fix Race Condition in BarrierMessageHandlerTests

    Main thread waited for map.size() to go to zero, which is the initial state; use a latch instead.
Commits on Nov 8, 2015
  1. Fix ZookeeperLeaderTests Race Condition

    Leadership was yielded before testing whether the adapter was started when leadership was granted.
    It was possible for the adapter to be stopped again before testing `isRunning()`.
Commits on Nov 7, 2015
  1. Extract LogAdjustingTestSupport

    Also add test debugging to JmsOutboundGatewayTests.
Commits on Nov 6, 2015
  1. @artembilan
Commits on Nov 5, 2015
  1. @artembilan

    INT-3878: MQTT Application Events (inbound)

    committed with artembilan
    Publish `ApplicationEvent`s to report inbound channel adapter connection
    Fixing typos and simple polishing.
Something went wrong with that request. Please try again.