Permalink
Switch branches/tags
Commits on Apr 23, 2018
  1. Fix `JdbcMessageStoreTests` to use H2, not Derby

    artembilan committed Apr 23, 2018
    Looks like Derby is much slower than H2, plus it doesn't look so stable
    having so much sporadic failures.
    
    Looks like moving to H2 here saves for us `500 ms` test working time
    
    **Cherry-pick to 5.0.x**
Commits on Apr 20, 2018
  1. Upgrade to Gradle 4.7 and others, polishing build (#2423)

    artembilan authored and garyrussell committed Apr 20, 2018
    * Upgrade to Gradle 4.7 and others, polishing build
    
    * Fix `MqttAdapterTests` according requirement of the latest Mockito
    * Move `int-derby.properties` to the `/resources` from `/java`
    
    * Fix Checkstyle violations
  2. Fix JdbcMessageStoreChannelTests race condition

    artembilan committed Apr 20, 2018
    The message in the `QueueChannel` appears for consuming a bit earlier
    than TX is committed
    
    * Introduce `afterCommitLatch` into the test verify the state
    when TX is really committed and data is removed from DB
    
    **Cherry-pick to 5.0.x and 4.3.x**
Commits on Apr 19, 2018
  1. Downgrade to Derby-10.13.1.1

    artembilan authored and garyrussell committed Apr 19, 2018
    Looks like we have started to fail much often
    since upgrade to the `Derby-10.14.1.0`:
    spring-projects@cb0d43d
    
    That is also related to this https://jira.spring.io/browse/INT-4445
    
    * Remove all the `drop` mentioning for Derby scripts -
    it just doesn't support `IF EXISTS`.
    More over we don't need to worry about drops since each test now starts
    its own fresh embedded DB
    
    **Cherry-pick to 5.0.x**
  2. INT-4446 Improve EmbeddedJsonHeadersMessageMapper (#2422)

    artembilan authored and garyrussell committed Apr 19, 2018
    * INT-4446 Improve EmbeddedJsonHeadersMessageMapper
    
    JIRA: https://jira.spring.io/browse/INT-4446
    
    * Do not recreate message if not necessarily
    * Do not let to generate `id` and `timestamp` if they are not mapped
    * Use `smartMatch` to allow to configure negative patterns
    * Introduce `PatternMatchUtils.smartMatchIgnoreCase()` for convenience
    
    **Cherry-pick to 5.0.x**
    
    * * Polishing `EmbeddedJsonHeadersMessageMapper`
Commits on Apr 18, 2018
  1. INT-4447: LockRegLeaderInit: Catch unlock errors

    artembilan authored and garyrussell committed Apr 17, 2018
    JIRA: https://jira.spring.io/browse/INT-4447
    
    When we get an exception during `this.lock.unlock()`, we don't revoke
    leadership.
    In case of external resource (e.g. JDBC) this may cause a race condition
    when the second candidate is selected as leader when connection comes back
    
    * Catch `this.lock.unlock()` exceptions and log them under DEBUG.
    This way we proceed to the `handleRevoked()` logic
    
    **Cherry-pick to 5.0.x and 4.3.x**
  2. INT-4448, INT-4449: Fix Gateway for no-arg method (#2420)

    artembilan authored and garyrussell committed Apr 18, 2018
    * INT-4448, INT-4449: Fix Gateway for no-arg method
    
    JIRA: https://jira.spring.io/browse/INT-4448
    JIRA: https://jira.spring.io/browse/INT-4449
    
    When we are not interested in the `payload` to send, we use a gateway
    method without any args, but in this case for send operation (or
    send-and-receive) we should specify a default `payloadExpression`
    
    The `MessagingGatewayRegistrar` fails with `NPE` if we don't have a
    any global headers and have `defaultPayloadExpression`
    
    Also in this case the `GatewayProxyFactoryBean` fails to send
    and fallbacks to receive with the meaning "no args, not payloadExpression"
    
    * Fix `MessagingGatewayRegistrar` to check `hasDefaultHeaders` before
    processing them
    * Fix `GatewayProxyFactoryBean` to consult `this.globalMethodMetadata`
    if there is no `payloadExpression` for the method specific metadata
    
    **Cherry-pick to 5.0.x and 4.3.x**
    
    * Remove `oracle-java8-installer` since it looks like the resource
    is not available anymore:
    
    ```
    Location: http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f [following]
    --2018-04-17 18:33:14--  http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f
    Connecting to download.oracle.com (download.oracle.com)|23.53.120.105|:80... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2018-04-17 18:35:15 ERROR 404: Not Found.
    ```
Commits on Apr 11, 2018
  1. Increase some tests performance

    artembilan committed Apr 11, 2018
    https://build.spring.io/browse/INT-MASTER-999/
    
    Since `BeanFactoryTypeConverterTests` and `CallerBlocksPolicyTests`
    uses too long `Thread.sleep()` there is no guarantee that they are going
    to be performed after expected 10 seconds
    
    * Decrease `Thread.sleep()` in those tests
Commits on Apr 10, 2018
  1. Deprecation doc polishing

    garyrussell authored and artembilan committed Apr 10, 2018
    Channel interceptors.
  2. Fix some sporadic tests failures

    artembilan committed Apr 10, 2018
    * Increase timeouts in the `RoundRobinDispatcherConcurrentTests` and
    `ManualFlowTests`
    * Fix `PollerAdviceTests` to re-use `TaskScheduler` from the ctx
    instead of local, not closed instance
    * Use `OnlyOnceTrigger` instead of local implementations
    * Change the `primary` `Trigger` bean to the `PeriodicTrigger` as well.
    The minimum interval for the `CronTrigger` is 1 seconds - it doesn't
    matter for this test-case
  3. Upgrade to SF 5.1; Remove Deprecated Code

    garyrussell authored and artembilan committed Apr 10, 2018
    Polishing - PR Comments
    
    Remove direct log4j usage in tests
    
    - hazelcast depends on it; retain the dependency just in jmx
    
    Fix hazelcast logger type
Commits on Apr 9, 2018
  1. INT-4445: Fix JDBC tests for Derby

    artembilan authored and garyrussell committed Apr 9, 2018
    JIRA: https://jira.spring.io/browse/INT-4445
    
    Looks like `/dataSource` temporary directory is busy in between different
    tests.
    The thought is like a high-frequently polling endpoint keeps DB resource
    from removing.
    
    * Explicitly `stop()` endpoint in the `JdbcMessageStoreChannelTests`
    * Optimize
    `JdbcMessageStoreChannelTests.testSendAndActivateTransactionalSend()`
    to rely on the short `1` millisecond TX timeout.
    This safes for us 10 seconds of the tests executions.
    * Configure all the embedded DB beans for the `ignore-failures="ALL"`
    as a fallback option if polling endpoint is not a cause of the concurrent
    resource access.
    
    **Cherry-pick to 5.0.x**
Commits on Apr 5, 2018
Commits on Apr 2, 2018
  1. INT-4438: No lifecycle twice in the same role

    artembilan authored and garyrussell committed Mar 23, 2018
    JIRA: https://jira.spring.io/browse/INT-4438
    
    The `SmartLifecycleRoleController` is based on the `MultiValueMap`
    which used internally a `List` for the values.
    With such an architecture we can add the same value several times.
    On the other hand we are iterating over `Lifecycle`s in the role and
    build a `Map` for their running status.
    In this case when `NamesComponent`s return the same name the Java
    `Collectors.toMap()` fails with a duplicate key error.
    
    In any cases it would be better do not allow to add the same lifecylce
    several time to the role or different with the same name.
    
    * Add search logic to the `addLifecycleToRole()` to fail fast with the
    `IllegalArgumentException` because a lifecycle with the same name is
    already present in the role
    
    **Cherry-pick to 5.0.x**
    
    * Remove redundant `this.initialized = false` from the
    `AbstractPollingEndpoint.doStop()`
    
    Add `allEndpointsRunning()` verification to the `EndpointRoleParserTests`
    
    Polishing
  2. Increase timeout for PollingConsumerEndpointTests

    artembilan committed Apr 2, 2018
    https://build.spring.io/browse/INT-SI50X-20
    
    Looks like 5 seconds is not enough to wait for the test completion,
    especially on CI server
    
    * Refactor `PollingConsumerEndpointTests` to use `OnlyOnceTrigger`
    from the test-support module instead of local `Trigger` implementation
    * Increase timeout for latch in the `OnlyOnceTrigger` to 10 seconds
    
    **Cherry-pick to 5.0.x**
  3. Fix NPE in the TcpNetServerConnectionFactory

    artembilan authored and garyrussell committed Apr 2, 2018
    https://build.spring.io/browse/INTSAMPLES-NIGHTLY-2413
    
    When we fail with the
    `java.net.BindException: Address already in use (Bind failed)` in the
    `TcpNetServerConnectionFactory.run()`, the `serverSocket` property
    remains `null` and we get `NPE` in the `catch` block trying to `close()`
    the socket.
    
    * Call `stop()` instead which has all the required protections.
    
    **Cherry-pick to 5.0.x and 4.3.x**
Commits on Mar 29, 2018
  1. Add BoundRabbitChannelAdvice

    garyrussell authored and artembilan committed Mar 28, 2018
    Polishing and docs
    
    Polishing - DEBUG log for confirms; add integration test
    
    Polishing - PR Comments
    
    Renamed Advice
    
    Verify acks logged.
    
    Polishing - more PR comments
    
    Renamed to BoundRabbitChannelAdvice.
    
    * Extract `ConfirmCallback`s instances for optimization
    * Remove unused constant
Commits on Mar 27, 2018
  1. Fix `Transformers` usage in Docs

    artembilan committed Mar 27, 2018
    **Cherry-pick to 5.0.x**
Commits on Mar 26, 2018
  1. INT-4443: Use SimpleEC for uriVariablesExpression

    garyrussell authored and artembilan committed Mar 23, 2018
    JIRA: https://jira.spring.io/browse/INT-4443
    
    **cherry-pick to 5.0.x, 4.3.x**
    
    Polishing; use data binding accessor in test evaluation contexts.
    
    Add `.withInstanceMethods()`
    
    See https://jira.spring.io/browse/SPR-16588?focusedCommentId=158041&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-158041
    
    * Polishing according PR comments
  2. Upgrade to H2 1.4.197

    artembilan committed Mar 26, 2018
    https://build.spring.io/browse/INT-FATS5IC-457
    
    The H2 `1.4.197` has fixed some issues
    (in particular h2database/h2database#178)
    and introduced some breaking changes for us, although they are
    reasonably good.
    
    * Fix `JdbcOutboundGatewayParserTests` to use correct identifiers
    for returned generated keys instead of previously used `SCOPE_IDENTITY()`
    
    **Cherry-pick to 5.0.x and 4.3.x**
  3. Reorder beans in JdbcPollingChAParserTests cofigs

    artembilan committed Mar 26, 2018
    https://build.spring.io/browse/INT-AT42SIO-820/
    
    The test configs use `fixed-rate="100"`.
    This way when Inbound Channel Adapter is declared earlier in the
    config than `<jdbc:embedded-database>`, there is a chance that we start
    to poll DB before it is really initialized.
    
    * Reorder config so embedded DB is initialized before an
    Inbound Channel Adapter
    
    **Cherry-pick to 5.0.x, 4.3.x and 4.2.x**
Commits on Mar 23, 2018
  1. INT-4440: Support serialized UUID in headers

    Nathan Kurtyka authored and artembilan committed Mar 22, 2018
    JIRA: https://jira.spring.io/browse/INT-4440
    
    The previous fix eliminated an extra `generateId()` call, but at the
    same introduced regression do not populate `id` and `timestamp` from
    the serialized state, e.g. after JSON transferring over the network
    
    * Introduce a couple utility methods in the `MutableMessageHeaders`
    to extract and parse `id` and `timestamp` from the provided headers
    
    **Cherry-pick to 5.0.x**
Commits on Mar 22, 2018
  1. Fix AMQP MessageSource Tests

    garyrussell authored and artembilan committed Mar 22, 2018
    https://build.spring.io/browse/INT-MASTER-983/
    
    Race between the poller and template to get the requeued message.
    
    Also add trace logging to the acknowledgment.
    
    **cherry-pick to 5.0.x**
  2. INT-4441: Fix ACMH Concurrency Problem

    garyrussell authored and artembilan committed Mar 22, 2018
    JIRA: https://jira.spring.io/browse/INT-4441
    
    Possible concurrent updates to `AbstractCorrelatingMessageHandler.groupIds` and
    `expireGroupScheduledFutures`.
  3. INT-4434: Allow to use sub-flows from beans

    artembilan authored and garyrussell committed Mar 21, 2018
    JIRA: https://jira.spring.io/browse/INT-4434
    
    There were a restriction introduced since Java DSL `1.2` do not use
    `IntegrationFlow` beans for sub-flow definitions, e.g. in routers.
    It is considered as regression by community because it worked before
    in version `1.1`
    
    * Introduce `IntegrationFlow.getInputChannel()` to be able to bridge
    from the main flow to the flow which is treated as sub-flow.
    In most cases we talk about an independent bean for the `IntegrationFlow`
    which can be used as a stand along one and as a sub-flow in other flow
    
    **Cherry-pick to 5.0.x**
    
    Add JavaDocs to the `EndpointSpec.obtainInputChannelFromFlow()`
Commits on Mar 21, 2018
  1. INT-4433: Optimize @Publisher metadata

    artembilan authored and garyrussell committed Mar 20, 2018
    JIRA: https://jira.spring.io/browse/INT-4433
    
    The current `MessagePublishingInterceptor` behavior is to parse expressions
    on each method invocation what is not so efficient at runtime
    
    * Introduce `default` `Expression`-based method to the `PublisherMetadataSource`
    contract and call existing String-based methods for backward compatibility.
    * Deprecate String-based `PublisherMetadataSource` methods in favor of newly
    introduced `Expression`-based
    * Implement new `getExpressionForPayload()` and `getExpressionsForHeaders()`
    in all the `PublisherMetadataSource` implementations
    * Cache parsed `Expression` s during initialization in the `PublisherMetadataSource`
    implementations or do that on demand in the `MethodAnnotationPublisherMetadataSource`
    by provided method basis
    * Introduce `MethodAnnotationPublisherMetadataSource#metadataCacheLimit` and populate
    its value from the `@EnablePublisher` or `<int:annotation-configuration>`
    * Implement `entrySet()` and `values()` in the `ExpressionEvalMap`
    
    **Cherry-pick to 5.0.x**
    
    * Add `@SuppressWarnings("varargs")` to avoid compilation warning
    
    * Remove LRU cache logic - it's fine to cache all the info about methods
    in the classpath
  2. LockRegistryLeaderInitiator: Add DEBUG for errors

    artembilan authored and garyrussell committed Mar 20, 2018
    For better traceability for errors during lock acquiring add DEBUG
    logging message in the `catch` block before returning back to the main
    loop for the next acquiring attempt
    
    **Cherry-pick to 5.0.x and 4.3.x**
  3. Fix unused imports

    artembilan committed Mar 21, 2018
  4. INT-4432: Mock Handler: fix output channel

    fifman authored and artembilan committed Mar 21, 2018
    JIRA: https://jira.spring.io/browse/INT-4432
    
    The `MockIntegrationContext.substituteMessageHandlerFor()` method
    cannot get the correct output channel of target message handler
    since the `outputChannel` property is not initialized.
    
    * Use `getOutputChannel()` method instead of directly accessing
    the `outputChannel` property. The `getOutputChannel()` method
    guarantees the correct value is retrieved.
    
    * Polishing Copyrights and author name
    * Simplify `MockMessageHandlerTests.testHandlerSubstitutionWithOutputChannel()`
    and its configuration
    
    **Cherry-pick to 5.0.x**
Commits on Mar 20, 2018
  1. INT-4437: Scatter-Gather: reinstate replyChannel

    artembilan authored and garyrussell committed Mar 20, 2018
    JIRA: https://jira.spring.io/browse/INT-4437
    
    The `ScatterGatherHandler` overrides a `replyChannel` header for the
    scatter message to its internal queue and doesn't reinstate the original
    `replyChannel` header when producer a gather result message
    
    * Rebuild gather result message with population a proper `replyChannel`
    header from the request message and removing a `gatherResultChannel`
    header
    
    **Cherry-pick to 5.0.3 and 4.3.x**
    
    Polishing
Commits on Mar 19, 2018
  1. Revert "Revert AMQP Upgrade until Cairo released"

    garyrussell committed Mar 19, 2018
    This reverts commit 8853e06.
Commits on Mar 18, 2018