From 6e7b4cfcc72c39b100d93213665112b05668b5ff Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 23 Jan 2017 15:33:30 -0500 Subject: [PATCH] GH-169: Upgrade and prepare for release Fixes GH-169 (https://github.com/spring-projects/spring-integration-extensions/issues/169) * Upgrade Gradle and dependencies * Apply Checkstyle --- spring-integration-hazelcast/build.gradle | 43 +- .../gradle/wrapper/gradle-wrapper.jar | Bin 53319 -> 54208 bytes .../gradle/wrapper/gradle-wrapper.properties | 4 +- spring-integration-hazelcast/gradlew | 22 +- spring-integration-hazelcast/gradlew.bat | 6 - .../src/checkstyle/checkstyle-header.txt | 17 + .../checkstyle/checkstyle-suppressions.xml | 12 + .../src/checkstyle/checkstyle.xml | 183 +++++ .../integration/hazelcast/CacheEventType.java | 37 +- .../hazelcast/CacheListeningPolicyType.java | 17 +- .../hazelcast/ClusterMonitorType.java | 32 +- .../DistributedSQLIterationType.java | 28 +- .../hazelcast/HazelcastHeaders.java | 18 +- ...zelcastIntegrationDefinitionValidator.java | 9 +- .../HazelcastLocalInstanceRegistrar.java | 8 +- .../AbstractHazelcastMessageProducer.java | 25 +- .../hazelcast/leader/LeaderInitiator.java | 20 +- .../message/EntryEventMessagePayload.java | 41 +- .../HazelcastIntegrationTestUser.java | 64 +- .../HazelcastTestRequestHandlerAdvice.java | 6 +- ...tributedMapInboundChannelAdapterTests.java | 216 ++--- ...sterMonitorInboundChannelAdapterTests.java | 212 ++--- ...EventDrivenInboundChannelAdapterTests.java | 88 +-- ...EventDrivenInboundChannelAdapterTests.java | 194 ++--- ...EventDrivenInboundChannelAdapterTests.java | 114 +-- ...tributedSQLInboundChannelAdapterTests.java | 74 +- ...EventDrivenInboundChannelAdapterTests.java | 114 +-- ...EventDrivenInboundChannelAdapterTests.java | 20 +- ...EventDrivenInboundChannelAdapterTests.java | 154 ++-- ...EventDrivenInboundChannelAdapterTests.java | 236 +++--- ...edMapInboundChannelAdapterConfigTests.java | 66 +- ...nitorInboundChannelAdapterConfigTests.java | 38 +- ...edSQLInboundChannelAdapterConfigTests.java | 84 +- ...rivenInboundChannelAdapterConfigTests.java | 162 ++-- ...stIntegrationInboundTestConfiguration.java | 554 ++++++------- ...zelcastInboundChannelAdapterTestUtils.java | 20 +- .../leader/LeaderInitiatorTests.java | 6 +- .../HazelcastOutboundChannelAdapterTests.java | 744 +++++++++--------- ...tIntegrationOutboundTestConfiguration.java | 410 +++++----- ...castOutboundChannelAdapterConfigTests.java | 226 +++--- ...elcastOutboundChannelAdapterTestUtils.java | 51 +- 41 files changed, 2364 insertions(+), 2011 deletions(-) create mode 100644 spring-integration-hazelcast/src/checkstyle/checkstyle-header.txt create mode 100644 spring-integration-hazelcast/src/checkstyle/checkstyle-suppressions.xml create mode 100644 spring-integration-hazelcast/src/checkstyle/checkstyle.xml diff --git a/spring-integration-hazelcast/build.gradle b/spring-integration-hazelcast/build.gradle index acd0d58..de389d3 100644 --- a/spring-integration-hazelcast/build.gradle +++ b/spring-integration-hazelcast/build.gradle @@ -1,27 +1,28 @@ buildscript { repositories { - maven { url 'http://repo.spring.io/plugins-release' } + maven { url 'https://repo.spring.io/plugins-release' } } dependencies { - classpath 'io.spring.gradle:spring-io-plugin:0.0.5.RELEASE' + classpath 'io.spring.gradle:dependency-management-plugin:1.0.0.RC2' + classpath 'io.spring.gradle:spring-io-plugin:0.0.6.RELEASE' } } plugins { - id "org.sonarqube" version "1.2" + id 'java' + id 'eclipse' + id 'idea' + id 'jacoco' + id 'checkstyle' + id 'org.sonarqube' version '2.1' } description = 'Spring Integration Hazelcast Support' -apply plugin: 'java' apply from: "${rootProject.projectDir}/publish-maven.gradle" -apply plugin: 'eclipse' -apply plugin: 'jacoco' -apply plugin: 'idea' group = 'org.springframework.integration' - repositories { if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { maven { url 'http://repo.spring.io/libs-snapshot' } @@ -41,12 +42,20 @@ if (project.hasProperty('platformVersion')) { } } -sourceCompatibility = targetCompatibility = 1.7 +compileJava { + sourceCompatibility = 1.7 + targetCompatibility = 1.7 +} + +compileTestJava { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 +} ext { - hazelcastVersion = '3.6.4' - slf4jVersion = '1.7.21' - springIntegrationVersion = '4.3.1.BUILD-SNAPSHOT' + hazelcastVersion = '3.7.4' + slf4jVersion = '1.7.22' + springIntegrationVersion = '4.3.6.RELEASE' idPrefix = 'hazelcast' @@ -69,7 +78,12 @@ sourceSets { } jacoco { - toolVersion = "0.7.6.201602180812" + toolVersion = "0.7.8" +} + +checkstyle { + configFile = file("$rootDir/src/checkstyle/checkstyle.xml") + toolVersion = "6.16.1" } // enable all compiler warnings; individual projects may customize further @@ -86,9 +100,6 @@ dependencies { testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion" } -// enable all compiler warnings; individual projects may customize further -[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options'] - test { // suppress all console output during testing unless running `gradle -i` logging.captureStandardOutput(LogLevel.INFO) diff --git a/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.jar b/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.jar index d3b83982b9b1bccad955349d702be9b884c6e049..c60754359fbdfb6cbb5e9e500db1287021e3ef3e 100644 GIT binary patch delta 21901 zcmZ6xb8shNv;H01wr$(CZQJ%Yn~iPTw(V?e+sVdu^4nAIsXEW|PEAkMJ<~n^OwIJ? zx_ZX)LHo-<5tL*>!O(z!prC+Y{77XI5C~EKZ?*FI>q!s@2uLkKNQLJD`@!YT1sLf6 z3ch?vW&T|S0{NfAzYXkPIJ#Ieg8u(<5~hh^{=b|4PesBjHP-*FHon7v$Dn|Kl2L(x zsDP4$2l0}Oh7kZMni0OJtH?h!33T4taDTAsnInKeMG~1k+Y`}nRkz-i=y7cpN3~^b zeIu&TtI+q@tVMi^&-FK&iF*`%#+r@h+oAajAs#?(;AWA?ope5cV682oMjaS^nONK`Bl^9c05nE8YQSbVa;uu^eIduUK+NdCl1N zu(6|@8G=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+M8*5Z5@Qe*Mlh!vV(?dDkR8wQk=c6Cs*uoV!~uj9^iSvdhyZ)w zz^T)l2^5LIc~y+!SO%gv;>NROZ;g7~rmq1~DsTf!>dOQqA|%(wjdnXk_O+EG7%T~3 z+S-RPQt>-TTp>uLbA6mgGQ+eRKA8R#5V~Dkte4b0@=pfVb3kfnW7I0rw^QISgaIG1{h^}>2}CAM0+VoINcM7-Ldjjam + + + + + + + + + diff --git a/spring-integration-hazelcast/src/checkstyle/checkstyle.xml b/spring-integration-hazelcast/src/checkstyle/checkstyle.xml new file mode 100644 index 0000000..920a484 --- /dev/null +++ b/spring-integration-hazelcast/src/checkstyle/checkstyle.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java index 976d32e..73b5f0c 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,45 @@ package org.springframework.integration.hazelcast; /** - * Enumeration of Cache Event Types + * Enumeration of Cache Event Types. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 + * * @see org.springframework.integration.hazelcast.inbound.AbstractHazelcastMessageProducer */ public enum CacheEventType { - ADDED, REMOVED, UPDATED, EVICTED, EVICT_ALL, CLEAR_ALL; + /** + * The Hazelcast ADDED event. + */ + ADDED, + + /** + * The Hazelcast REMOVED event. + */ + REMOVED, + + /** + * The Hazelcast UPDATED event. + */ + UPDATED, + + /** + * The Hazelcast EVICTED event. + */ + EVICTED, + + /** + * The Hazelcast EVICT_ALL event. + */ + EVICT_ALL, + + /** + * The Hazelcast CLEAR_ALL event. + */ + CLEAR_ALL } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheListeningPolicyType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheListeningPolicyType.java index 22ac779..7454b41 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheListeningPolicyType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheListeningPolicyType.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,25 @@ package org.springframework.integration.hazelcast; /** - * Enumeration of Cache Listening Policy Type + * Enumeration of Cache Listening Policy Type. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 + * * @see org.springframework.integration.hazelcast.inbound.AbstractHazelcastMessageProducer */ public enum CacheListeningPolicyType { - SINGLE, ALL; + /** + * Only the local Hazelcast node can accept event. + */ + SINGLE, + + /** + * All subscribed members can accept event. + */ + ALL } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java index 43090df..33f46ee 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,13 @@ package org.springframework.integration.hazelcast; /** - * Enumeration of Hazelcast Cluster Monitor Types + * Enumeration of Hazelcast Cluster Monitor Types. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 + * * @see org.springframework.integration.hazelcast.inbound.HazelcastClusterMonitorMessageProducer * @see com.hazelcast.core.MembershipListener * @see com.hazelcast.core.DistributedObjectListener @@ -30,6 +33,29 @@ package org.springframework.integration.hazelcast; */ public enum ClusterMonitorType { - MEMBERSHIP, DISTRIBUTED_OBJECT, MIGRATION, LIFECYCLE, CLIENT; + /** + * The membership listener mode. + */ + MEMBERSHIP, + + /** + * The distributed object listener mode. + */ + DISTRIBUTED_OBJECT, + + /** + * The migration listener mode. + */ + MIGRATION, + + /** + * The listener listener mode. + */ + LIFECYCLE, + + /** + * The client listener mode. + */ + CLIENT } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java index e2b9393..6dcafca 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,36 @@ package org.springframework.integration.hazelcast; /** - * Enumeration of Distributed SQL Iteration Type + * Enumeration of Distributed SQL Iteration Type. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 + * * @see org.springframework.integration.hazelcast.inbound.HazelcastDistributedSQLMessageSource + * @see com.hazelcast.core.IMap */ public enum DistributedSQLIterationType { - ENTRY, KEY, LOCAL_KEY, VALUE + /** + * The {@link com.hazelcast.core.IMap#entrySet()} to iterate. + */ + ENTRY, + + /** + * The {@link com.hazelcast.core.IMap#keySet()} to iterate. + */ + KEY, + + /** + * The {@link com.hazelcast.core.IMap#localKeySet()} to iterate. + */ + LOCAL_KEY, + + /** + * The {@link com.hazelcast.core.IMap#values()} to iterate. + */ + VALUE } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastHeaders.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastHeaders.java index 255427d..0812afb 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastHeaders.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,21 +17,35 @@ package org.springframework.integration.hazelcast; /** - * Hazelcast Message Headers + * Hazelcast Message Headers. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 */ public abstract class HazelcastHeaders { private static final String PREFIX = "hazelcast_"; + /** + * The event type header name. + */ public static final String EVENT_TYPE = PREFIX + "eventType"; + /** + * The member header name. + */ public static final String MEMBER = PREFIX + "member"; + /** + * The cache name header name. + */ public static final String CACHE_NAME = PREFIX + "cacheName"; + /** + * The publishing time header name. + */ public static final String PUBLISHING_TIME = PREFIX + "publishingTime"; } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java index befcdd5..be7390b 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,9 +36,11 @@ import com.hazelcast.core.ReplicatedMap; * Common Validator for Hazelcast Integration. It validates cache types and events. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 */ -public class HazelcastIntegrationDefinitionValidator { +public final class HazelcastIntegrationDefinitionValidator { public static > Set validateEnumType(final Class enumType, final String types) { Set typeSet = StringUtils.commaDelimitedListToSet(StringUtils.trimAllWhitespace(types)); @@ -100,4 +102,7 @@ public class HazelcastIntegrationDefinitionValidator { } } + private HazelcastIntegrationDefinitionValidator() { + } + } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java index 3bab913..cbb64ed 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,9 +37,15 @@ import com.hazelcast.core.MultiMap; */ public class HazelcastLocalInstanceRegistrar implements SmartInitializingSingleton { + /** + * The name for the Hazelcast MultiMap used for membership registration. + */ public static final String SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP = "SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP"; + /** + * The name for the Hazelcast Lock used for membership registration. + */ public static final String SPRING_INTEGRATION_INTERNAL_CLUSTER_LOCK = "SPRING_INTEGRATION_INTERNAL_CLUSTER_LOCK"; @Override diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java index 722348e..b77ac9c 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,7 +66,7 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu } protected Set getCacheEvents() { - return cacheEvents; + return this.cacheEvents; } public void setCacheEventTypes(String cacheEventTypes) { @@ -79,7 +79,7 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu } protected CacheListeningPolicyType getCacheListeningPolicy() { - return cacheListeningPolicy; + return this.cacheListeningPolicy; } public void setCacheListeningPolicy(CacheListeningPolicyType cacheListeningPolicy) { @@ -88,13 +88,18 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu } protected String getHazelcastRegisteredEventListenerId() { - return hazelcastRegisteredEventListenerId; + return this.hazelcastRegisteredEventListenerId; } protected void setHazelcastRegisteredEventListenerId(String hazelcastRegisteredEventListenerId) { this.hazelcastRegisteredEventListenerId = hazelcastRegisteredEventListenerId; } + /** + * A base event listener abstraction. + * + * @param the event type + */ protected abstract class AbstractHazelcastEventListener { protected abstract void processEvent(E event); @@ -102,7 +107,7 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu protected abstract Message toMessage(E event); protected void sendMessage(E event, InetSocketAddress socketAddress, - CacheListeningPolicyType cacheListeningPolicyType) { + CacheListeningPolicyType cacheListeningPolicyType) { if (CacheListeningPolicyType.ALL == cacheListeningPolicyType || isEventAcceptable(socketAddress)) { AbstractHazelcastMessageProducer.this.sendMessage(toMessage(event)); } @@ -141,6 +146,12 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu } + /** + * The {@link AbstractHazelcastEventListener} implementation for the {@link AbstractIMapEvent}s. + * + * @param the entry key type + * @param the entry value type + */ protected final class HazelcastEntryListener extends AbstractHazelcastEventListener implements EntryListener { @@ -177,8 +188,8 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu @Override protected void processEvent(AbstractIMapEvent event) { if (getCacheEvents().contains(event.getEventType().toString())) { - if (logger.isDebugEnabled()) { - logger.debug("Received Event : " + event); + if (AbstractHazelcastMessageProducer.this.logger.isDebugEnabled()) { + AbstractHazelcastMessageProducer.this.logger.debug("Received Event : " + event); } sendMessage(event, event.getMember().getSocketAddress(), getCacheListeningPolicy()); } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java index d01c2a5..97dee71 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java @@ -1,11 +1,11 @@ /* - * Copyright 2014-2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -97,25 +97,14 @@ public class LeaderInitiator implements SmartLifecycle, DisposableBean, Applicat private boolean customPublisher = false; - /** - * @see SmartLifecycle - */ private volatile boolean autoStartup = true; - /** - * @see SmartLifecycle which is an extension of org.springframework.context.Phased - */ private volatile int phase; - /** - * Flag that indicates whether the leadership election for - * this {@link #candidate} is running. - */ private volatile boolean running; /** * Construct a {@link LeaderInitiator} with a default candidate. - * * @param client Hazelcast client */ public LeaderInitiator(HazelcastInstance client) { @@ -124,7 +113,6 @@ public class LeaderInitiator implements SmartLifecycle, DisposableBean, Applicat /** * Construct a {@link LeaderInitiator}. - * * @param client Hazelcast client * @param candidate leadership election candidate */ @@ -146,6 +134,7 @@ public class LeaderInitiator implements SmartLifecycle, DisposableBean, Applicat } /** + * The context of the initiator or null if not running. * @return the context (or null if not running) */ public Context getContext() { @@ -214,6 +203,7 @@ public class LeaderInitiator implements SmartLifecycle, DisposableBean, Applicat } /** + * {@code true} if leadership election for this {@link #candidate} is running. * @return true if leadership election for this {@link #candidate} is running */ @Override @@ -248,7 +238,7 @@ public class LeaderInitiator implements SmartLifecycle, DisposableBean, Applicat if (this.locked) { LeaderInitiator.this.leaderEventPublisher.publishOnGranted(LeaderInitiator.this, this.context, this.role); - LeaderInitiator.this.candidate.onGranted(context); + LeaderInitiator.this.candidate.onGranted(this.context); Thread.sleep(Long.MAX_VALUE); } } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/message/EntryEventMessagePayload.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/message/EntryEventMessagePayload.java index fa02d38..cd55425 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/message/EntryEventMessagePayload.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/message/EntryEventMessagePayload.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,22 +13,37 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.integration.hazelcast.message; import org.springframework.util.Assert; /** - * Hazelcast Message Payload for Entry Events + * Hazelcast Message Payload for Entry Events. + * + * @param the entry key type + * @param the entry value type * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 */ public class EntryEventMessagePayload { + /** + * The entry key. + */ public final K key; + /** + * The entry value. + */ public final V value; + /** + * The entry old value if any. + */ public final V oldValue; public EntryEventMessagePayload(final K key, final V value, final V oldValue) { @@ -40,27 +55,31 @@ public class EntryEventMessagePayload { @Override public String toString() { - return "EntryEventMessagePayload [key=" + key + ", value=" + value + ", oldValue=" + oldValue + "]"; + return "EntryEventMessagePayload [key=" + this.key + ", value=" + this.value + ", oldValue=" + this.oldValue + "]"; } @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } EntryEventMessagePayload that = (EntryEventMessagePayload) o; - return key.equals(that.key) && !(value != null ? !value.equals(that.value) - : that.value != null) && !(oldValue != null - ? !oldValue.equals(that.oldValue) : that.oldValue != null); + return this.key.equals(that.key) && !(this.value != null ? !this.value.equals(that.value) + : that.value != null) && !(this.oldValue != null + ? !this.oldValue.equals(that.oldValue) : that.oldValue != null); } @Override public int hashCode() { - int result = key.hashCode(); - result = 31 * result + (value != null ? value.hashCode() : 0); - result = 31 * result + (oldValue != null ? oldValue.hashCode() : 0); + int result = this.key.hashCode(); + result = 31 * result + (this.value != null ? this.value.hashCode() : 0); + result = 31 * result + (this.oldValue != null ? this.oldValue.hashCode() : 0); return result; } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationTestUser.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationTestUser.java index b619096..00fe7c5 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationTestUser.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationTestUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package org.springframework.integration.hazelcast; import java.io.Serializable; +import java.util.Objects; /** * User Bean for Hazelcast Integration Unit Tests @@ -87,48 +88,29 @@ public class HazelcastIntegrationTestUser implements Comparable user.getId()) ? 1 : 0; + return (this.id < user.getId()) ? -1 : (this.id > user.getId()) ? 1 : 0; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HazelcastIntegrationTestUser that = (HazelcastIntegrationTestUser) o; + return id == that.id && + age == that.age && + Objects.equals(name, that.name) && + Objects.equals(surname, that.surname); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, surname, age); } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastTestRequestHandlerAdvice.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastTestRequestHandlerAdvice.java index 820a8dc..1bfc189 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastTestRequestHandlerAdvice.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastTestRequestHandlerAdvice.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,12 +22,12 @@ import org.springframework.integration.handler.advice.AbstractRequestHandlerAdvi import org.springframework.messaging.Message; /** - * {@link MessageHandler} advice class for Hazelcast Integration Unit Tests. + * {@link AbstractRequestHandlerAdvice} advice class for Hazelcast Integration Unit Tests. * * @author Eren Avsarogullari * @since 1.0.0 */ -public class HazelcastTestRequestHandlerAdvice extends AbstractRequestHandlerAdvice { +public class HazelcastTestRequestHandlerAdvice extends AbstractRequestHandlerAdvice { public CountDownLatch executeLatch = null; diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java index 95cc4a6..f83f6c3 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ package org.springframework.integration.hazelcast.inbound; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; import javax.annotation.Resource; @@ -51,127 +51,127 @@ import com.hazelcast.core.IMap; @SuppressWarnings("unchecked") public class HazelcastCQDistributedMapInboundChannelAdapterTests { - @Autowired - private PollableChannel cqMapChannel1; + @Autowired + private PollableChannel cqMapChannel1; - @Autowired - private PollableChannel cqMapChannel2; + @Autowired + private PollableChannel cqMapChannel2; - @Autowired - private PollableChannel cqMapChannel3; + @Autowired + private PollableChannel cqMapChannel3; - @Autowired - private PollableChannel cqMapChannel4; + @Autowired + private PollableChannel cqMapChannel4; - @Autowired - private PollableChannel cqMapChannel5; + @Autowired + private PollableChannel cqMapChannel5; - @Resource - private IMap cqDistributedMap1; + @Resource + private IMap cqDistributedMap1; - @Resource - private IMap cqDistributedMap2; + @Resource + private IMap cqDistributedMap2; - @Resource - private IMap cqDistributedMap3; + @Resource + private IMap cqDistributedMap3; - @Resource - private IMap cqDistributedMap4; + @Resource + private IMap cqDistributedMap4; - @Resource - private IMap cqDistributedMap5; + @Resource + private IMap cqDistributedMap5; - @Test - public void testContinuousQueryForOnlyADDEDEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForADDEDDistributedMapEntryEvent(cqDistributedMap1, - cqMapChannel1, "cqDistributedMap1"); - } + @Test + public void testContinuousQueryForOnlyADDEDEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForADDEDDistributedMapEntryEvent(cqDistributedMap1, + cqMapChannel1, "cqDistributedMap1"); + } - @Test - public void testContinuousQueryForOnlyREMOVEDEntryEvent() { - cqDistributedMap2 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - cqDistributedMap2 - .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - cqDistributedMap2.remove(2); - Message msg = - cqMapChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - assertEquals(EntryEventType.REMOVED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - assertEquals("cqDistributedMap2", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testContinuousQueryForOnlyREMOVEDEntryEvent() { + cqDistributedMap2 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + cqDistributedMap2 + .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + cqDistributedMap2.remove(2); + Message msg = + cqMapChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + assertEquals(EntryEventType.REMOVED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + assertEquals("cqDistributedMap2", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - assertEquals(Integer.valueOf(2), - ((EntryEventMessagePayload) msg - .getPayload()).key); - assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - } + assertEquals(Integer.valueOf(2), + ((EntryEventMessagePayload) msg + .getPayload()).key); + assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + } - @Test - public void testContinuousQueryForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedMapEntryEvents(cqDistributedMap3, - cqMapChannel3, "cqDistributedMap3"); - } + @Test + public void testContinuousQueryForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedMapEntryEvents(cqDistributedMap3, + cqMapChannel3, "cqDistributedMap3"); + } - @Test - public void testContinuousQueryForOnlyUPDATEDEntryEvent() { - cqDistributedMap4 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - cqDistributedMap4 - .put(1, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - Message msg = - cqMapChannel4.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - assertEquals(EntryEventType.UPDATED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - assertEquals("cqDistributedMap4", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testContinuousQueryForOnlyUPDATEDEntryEvent() { + cqDistributedMap4 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + cqDistributedMap4 + .put(1, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + Message msg = + cqMapChannel4.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + assertEquals(EntryEventType.UPDATED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + assertEquals("cqDistributedMap4", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - assertEquals(Integer.valueOf(1), - ((EntryEventMessagePayload) msg - .getPayload()).key); - assertEquals(1, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - assertEquals("TestName1", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - assertEquals("TestSurname1", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).value).getId()); - assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).value).getName()); - assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).value).getSurname()); - } + assertEquals(Integer.valueOf(1), + ((EntryEventMessagePayload) msg + .getPayload()).key); + assertEquals(1, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + assertEquals("TestName1", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + assertEquals("TestSurname1", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).value).getId()); + assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).value).getName()); + assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).value).getSurname()); + } - @Test - public void testContinuousQueryForOnlyUPDATEDEntryEventWhenIncludeValueIsFalse() { - HazelcastInboundChannelAdapterTestUtils - .testContinuousQueryForUPDATEDEntryEventWhenIncludeValueIsFalse( - cqDistributedMap5, cqMapChannel5, "cqDistributedMap5"); - } + @Test + public void testContinuousQueryForOnlyUPDATEDEntryEventWhenIncludeValueIsFalse() { + HazelcastInboundChannelAdapterTestUtils + .testContinuousQueryForUPDATEDEntryEventWhenIncludeValueIsFalse( + cqDistributedMap5, cqMapChannel5, "cqDistributedMap5"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java index bb4d455..48e22f0 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,10 @@ package org.springframework.integration.hazelcast.inbound; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; @@ -53,135 +54,136 @@ import com.hazelcast.core.MigrationEvent; @DirtiesContext public class HazelcastClusterMonitorInboundChannelAdapterTests { - private static final String TEST_GROUP_NAME1 = "Test_Group_Name1"; + private static final String TEST_GROUP_NAME1 = "Test_Group_Name1"; - @Autowired - private PollableChannel cmChannel1; + @Autowired + private PollableChannel cmChannel1; - @Autowired - private PollableChannel cmChannel2; + @Autowired + private PollableChannel cmChannel2; - @Autowired - private PollableChannel cmChannel3; + @Autowired + private PollableChannel cmChannel3; - @Autowired - private PollableChannel cmChannel4; + @Autowired + private PollableChannel cmChannel4; - @Autowired - private PollableChannel cmChannel5; + @Autowired + private PollableChannel cmChannel5; - @Autowired - private PollableChannel cmChannel6; + @Autowired + private PollableChannel cmChannel6; - @Autowired - private HazelcastInstance hazelcastInstance; + @Autowired + private HazelcastInstance hazelcastInstance; - @Autowired - private HazelcastInstance hazelcastInstance2; + @Autowired + private HazelcastInstance hazelcastInstance2; - @Autowired - private HazelcastInstance hazelcastInstance3; + @Autowired + private HazelcastInstance hazelcastInstance3; - @Test - public void testMembershipEvent() { - HazelcastInboundChannelAdapterTestUtils - .testMembershipEvent(hazelcastInstance, cmChannel1, "testKey1", "testValue1"); - } + @Test + public void testMembershipEvent() { + HazelcastInboundChannelAdapterTestUtils + .testMembershipEvent(hazelcastInstance, cmChannel1, "testKey1", "testValue1"); + } - @Test - public void testDistributedObjectEvent() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedObjectEventByChannelAndHazelcastInstance(cmChannel2, - hazelcastInstance, "Test_Distributed_Map4"); - } + @Test + public void testDistributedObjectEvent() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedObjectEventByChannelAndHazelcastInstance(cmChannel2, + hazelcastInstance, "Test_Distributed_Map4"); + } - @Test - public void testMigrationEvent() { - final IMap distributedMap = - hazelcastInstance3.getMap("Test_Distributed_Map2"); - distributedMap.put(1, "TestValue1"); - distributedMap.put(2, "TestValue2"); + @Test + public void testMigrationEvent() { + final IMap distributedMap = + hazelcastInstance3.getMap("Test_Distributed_Map2"); + distributedMap.put(1, "TestValue1"); + distributedMap.put(2, "TestValue2"); - hazelcastInstance3.getLifecycleService().terminate(); - final Message msg = - cmChannel3.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyMigrationEvent(msg); - } + hazelcastInstance3.getLifecycleService().terminate(); + final Message msg = this.cmChannel3.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + verifyMigrationEvent(msg); + } - @Test - public void testLifecycleEvent() throws InterruptedException { - hazelcastInstance2.getLifecycleService().terminate(); + @Test + public void testLifecycleEvent() { + hazelcastInstance2.getLifecycleService().terminate(); - Message msg = - cmChannel4.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyLifecycleEvent(msg, LifecycleState.SHUTTING_DOWN); + Message msg = + cmChannel4.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + verifyLifecycleEvent(msg, LifecycleState.SHUTTING_DOWN); - msg = cmChannel4.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyLifecycleEvent(msg, LifecycleState.SHUTDOWN); - } + msg = cmChannel4.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + verifyLifecycleEvent(msg, LifecycleState.SHUTDOWN); + } - @Test - public void testClientEvent() { - testClientEventByChannelAndGroupName(cmChannel5, TEST_GROUP_NAME1); - } + @Test + public void testClientEvent() { + testClientEventByChannelAndGroupName(cmChannel5, TEST_GROUP_NAME1); + } - @Test - public void testMultipleMonitorTypes() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedObjectEventByChannelAndHazelcastInstance(cmChannel6, - hazelcastInstance, "Test_Distributed_Map5"); + @Test + public void testMultipleMonitorTypes() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedObjectEventByChannelAndHazelcastInstance(cmChannel6, + hazelcastInstance, "Test_Distributed_Map5"); - HazelcastInboundChannelAdapterTestUtils - .testMembershipEvent(hazelcastInstance, cmChannel6, "testKey2", "testValue2"); - } + HazelcastInboundChannelAdapterTestUtils + .testMembershipEvent(hazelcastInstance, cmChannel6, "testKey2", "testValue2"); + } - private void testClientEventByChannelAndGroupName(final PollableChannel channel, - final String groupName) { - final HazelcastInstance client = getHazelcastClientByGroupName(groupName); + private void testClientEventByChannelAndGroupName(final PollableChannel channel, + final String groupName) { + final HazelcastInstance client = getHazelcastClientByGroupName(groupName); - Message msg = channel.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyClientEvent(msg); + Message msg = channel.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + verifyClientEvent(msg); - client.getLifecycleService().terminate(); + client.getLifecycleService().terminate(); - msg = channel.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyClientEvent(msg); - } + msg = channel.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + verifyClientEvent(msg); + } - private HazelcastInstance getHazelcastClientByGroupName(final String groupName) { - final GroupConfig groupConfig = new GroupConfig(); - groupConfig.setName(groupName); - groupConfig.setPassword("dev-pass"); - final ClientConfig cfg = new ClientConfig(); - cfg.setGroupConfig(groupConfig); - cfg.getNetworkConfig().addAddress("127.0.0.1:5701"); + private HazelcastInstance getHazelcastClientByGroupName(final String groupName) { + final GroupConfig groupConfig = new GroupConfig(); + groupConfig.setName(groupName); + groupConfig.setPassword("dev-pass"); + final ClientConfig cfg = new ClientConfig(); + cfg.setGroupConfig(groupConfig); + cfg.getNetworkConfig().addAddress("127.0.0.1:5701"); - return HazelcastClient.newHazelcastClient(cfg); - } + return HazelcastClient.newHazelcastClient(cfg); + } - private void verifyMigrationEvent(final Message msg) { - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertTrue(msg.getPayload() instanceof MigrationEvent); - assertNotNull(((MigrationEvent) msg.getPayload()).getStatus()); - assertNotNull(((MigrationEvent) msg.getPayload()).getNewOwner()); - assertNotNull(((MigrationEvent) msg.getPayload()).getOldOwner()); - } + private void verifyMigrationEvent(final Message msg) { + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertTrue(msg.getPayload() instanceof MigrationEvent); + assertNotNull(((MigrationEvent) msg.getPayload()).getStatus()); + assertNotNull(((MigrationEvent) msg.getPayload()).getNewOwner()); - private void verifyLifecycleEvent(final Message msg, - final LifecycleState lifecycleState) { - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertTrue(msg.getPayload() instanceof LifecycleEvent); - assertEquals(lifecycleState, ((LifecycleEvent) msg.getPayload()).getState()); - } + // Newer Hazelcast versions doesn't populated 'oldOwner' if we drop member on the same host + assertNull(((MigrationEvent) msg.getPayload()).getOldOwner()); + } - private void verifyClientEvent(final Message msg) { - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertTrue(msg.getPayload() instanceof Client); - assertEquals(ClientType.JAVA, ((Client) msg.getPayload()).getClientType()); - assertNotNull(((Client) msg.getPayload()).getSocketAddress()); - } + private void verifyLifecycleEvent(final Message msg, + final LifecycleState lifecycleState) { + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertTrue(msg.getPayload() instanceof LifecycleEvent); + assertEquals(lifecycleState, ((LifecycleEvent) msg.getPayload()).getState()); + } + + private void verifyClientEvent(final Message msg) { + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertTrue(msg.getPayload() instanceof Client); + assertEquals(ClientType.JAVA, ((Client) msg.getPayload()).getClientType()); + assertNotNull(((Client) msg.getPayload()).getSocketAddress()); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java index 55cc315..0a2c4d7 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,56 +48,56 @@ import com.hazelcast.core.IList; @DirtiesContext public class HazelcastDistributedListEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edListChannel1; + @Autowired + private PollableChannel edListChannel1; - @Autowired - private PollableChannel edListChannel2; + @Autowired + private PollableChannel edListChannel2; - @Autowired - private PollableChannel edListChannel3; + @Autowired + private PollableChannel edListChannel3; - @Resource - private IList edDistributedList1; + @Resource + private IList edDistributedList1; - @Resource - private IList edDistributedList2; + @Resource + private IList edDistributedList2; - @Resource - private IList edDistributedList3; + @Resource + private IList edDistributedList3; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - edDistributedList1.add(new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - Message msg = edListChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - assertEquals(EntryEventType.ADDED.toString(), msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); - assertEquals(1, ((HazelcastIntegrationTestUser) msg.getPayload()).getId()); - assertEquals("TestName1", ((HazelcastIntegrationTestUser) msg.getPayload()).getName()); - assertEquals("TestSurname1", ((HazelcastIntegrationTestUser) msg.getPayload()).getSurname()); - } + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + edDistributedList1.add(new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + Message msg = edListChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + assertEquals(EntryEventType.ADDED.toString(), msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); + assertEquals(1, ((HazelcastIntegrationTestUser) msg.getPayload()).getId()); + assertEquals("TestName1", ((HazelcastIntegrationTestUser) msg.getPayload()).getName()); + assertEquals("TestSurname1", ((HazelcastIntegrationTestUser) msg.getPayload()).getSurname()); + } - @Test - public void testEventDrivenForOnlyREMOVEDEntryEvent() { - HazelcastIntegrationTestUser user = new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"); - edDistributedList2.add(user); - edDistributedList2.remove(user); - Message msg = edListChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - assertEquals(EntryEventType.REMOVED.toString(), msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); - assertEquals(2, ((HazelcastIntegrationTestUser) msg.getPayload()).getId()); - assertEquals("TestName2", ((HazelcastIntegrationTestUser) msg.getPayload()).getName()); - assertEquals("TestSurname2", ((HazelcastIntegrationTestUser) msg.getPayload()).getSurname()); - } + @Test + public void testEventDrivenForOnlyREMOVEDEntryEvent() { + HazelcastIntegrationTestUser user = new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"); + edDistributedList2.add(user); + edDistributedList2.remove(user); + Message msg = edListChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + assertNotNull(msg); + assertNotNull(msg.getPayload()); + assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + assertEquals(EntryEventType.REMOVED.toString(), msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); + assertEquals(2, ((HazelcastIntegrationTestUser) msg.getPayload()).getId()); + assertEquals("TestName2", ((HazelcastIntegrationTestUser) msg.getPayload()).getName()); + assertEquals("TestSurname2", ((HazelcastIntegrationTestUser) msg.getPayload()).getSurname()); + } - @Test - public void testEventDrivenForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedCollectionItemEvents(edDistributedList3, edListChannel3); - } + @Test + public void testEventDrivenForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedCollectionItemEvents(edDistributedList3, edListChannel3); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java index 4dd5b60..a47f753 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,114 +48,114 @@ import com.hazelcast.core.IMap; @SuppressWarnings("unchecked") public class HazelcastDistributedMapEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edMapChannel1; + @Autowired + private PollableChannel edMapChannel1; - @Autowired - private PollableChannel edMapChannel2; + @Autowired + private PollableChannel edMapChannel2; - @Autowired - private PollableChannel edMapChannel3; + @Autowired + private PollableChannel edMapChannel3; - @Autowired - private PollableChannel edMapChannel4; + @Autowired + private PollableChannel edMapChannel4; - @Resource - private IMap edDistributedMap1; + @Resource + private IMap edDistributedMap1; - @Resource - private IMap edDistributedMap2; + @Resource + private IMap edDistributedMap2; - @Resource - private IMap edDistributedMap3; + @Resource + private IMap edDistributedMap3; - @Resource - private IMap edDistributedMap4; + @Resource + private IMap edDistributedMap4; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForADDEDDistributedMapEntryEvent(edDistributedMap1, - edMapChannel1, "edDistributedMap1"); - } + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForADDEDDistributedMapEntryEvent(edDistributedMap1, + edMapChannel1, "edDistributedMap1"); + } - @Test - public void testEventDrivenForOnlyUPDATEDEntryEvent() { - edDistributedMap2 - .put(2, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - edDistributedMap2 - .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - Message msg = - edMapChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.UPDATED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edDistributedMap2", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testEventDrivenForOnlyUPDATEDEntryEvent() { + edDistributedMap2 + .put(2, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + edDistributedMap2 + .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + Message msg = + edMapChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.UPDATED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edDistributedMap2", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(2), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertEquals(1, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - Assert.assertEquals("TestName1", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - Assert.assertEquals("TestSurname1", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - Assert.assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).value).getId()); - Assert.assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).value).getName()); - Assert.assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).value).getSurname()); - } + Assert.assertEquals(Integer.valueOf(2), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertEquals(1, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + Assert.assertEquals("TestName1", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + Assert.assertEquals("TestSurname1", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + Assert.assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).value).getId()); + Assert.assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).value).getName()); + Assert.assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).value).getSurname()); + } - @Test - public void testEventDrivenForOnlyREMOVEDEntryEvent() { - edDistributedMap3 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - edDistributedMap3 - .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - edDistributedMap3.remove(2); - Message msg = - edMapChannel3.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.REMOVED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edDistributedMap3", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testEventDrivenForOnlyREMOVEDEntryEvent() { + edDistributedMap3 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + edDistributedMap3 + .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + edDistributedMap3.remove(2); + Message msg = + edMapChannel3.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.REMOVED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edDistributedMap3", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(2), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - Assert.assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - Assert.assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - } + Assert.assertEquals(Integer.valueOf(2), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + Assert.assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + Assert.assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + } - @Test - public void testEventDrivenForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedMapEntryEvents(edDistributedMap4, edMapChannel4, - "edDistributedMap4"); - } + @Test + public void testEventDrivenForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedMapEntryEvents(edDistributedMap4, edMapChannel4, + "edDistributedMap4"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java index a8cc9d4..3932f73 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,69 +46,69 @@ import com.hazelcast.core.IQueue; @DirtiesContext public class HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edQueueChannel1; + @Autowired + private PollableChannel edQueueChannel1; - @Autowired - private PollableChannel edQueueChannel2; + @Autowired + private PollableChannel edQueueChannel2; - @Autowired - private PollableChannel edQueueChannel3; + @Autowired + private PollableChannel edQueueChannel3; - @Resource - private IQueue edDistributedQueue1; + @Resource + private IQueue edDistributedQueue1; - @Resource - private IQueue edDistributedQueue2; + @Resource + private IQueue edDistributedQueue2; - @Resource - private IQueue edDistributedQueue3; + @Resource + private IQueue edDistributedQueue3; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - edDistributedQueue1 - .add(new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - Message msg = - edQueueChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.ADDED.toString(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); - Assert - .assertEquals(1, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); - Assert.assertEquals("TestName1", - (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); - Assert.assertEquals("TestSurname1", - (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); - } + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + edDistributedQueue1 + .add(new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + Message msg = + edQueueChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.ADDED.toString(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); + Assert + .assertEquals(1, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); + Assert.assertEquals("TestName1", + (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); + Assert.assertEquals("TestSurname1", + (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); + } - @Test - public void testEventDrivenForOnlyREMOVEDEntryEvent() { - HazelcastIntegrationTestUser user = - new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"); - edDistributedQueue2.add(user); - edDistributedQueue2.remove(user); - Message msg = - edQueueChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.REMOVED.toString(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); - Assert - .assertEquals(2, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); - Assert.assertEquals("TestName2", - (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); - Assert.assertEquals("TestSurname2", - (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); - } + @Test + public void testEventDrivenForOnlyREMOVEDEntryEvent() { + HazelcastIntegrationTestUser user = + new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"); + edDistributedQueue2.add(user); + edDistributedQueue2.remove(user); + Message msg = + edQueueChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.REMOVED.toString(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); + Assert + .assertEquals(2, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); + Assert.assertEquals("TestName2", + (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); + Assert.assertEquals("TestSurname2", + (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); + } - @Test - public void testEventDrivenForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedCollectionItemEvents(edDistributedQueue3, - edQueueChannel3); - } + @Test + public void testEventDrivenForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedCollectionItemEvents(edDistributedQueue3, + edQueueChannel3); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java index fa4f405..16f60a6 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,52 +42,52 @@ import com.hazelcast.core.IMap; @DirtiesContext public class HazelcastDistributedSQLInboundChannelAdapterTests { - @Autowired - private PollableChannel dsMapChannel1; + @Autowired + private PollableChannel dsMapChannel1; - @Autowired - private PollableChannel dsMapChannel2; + @Autowired + private PollableChannel dsMapChannel2; - @Autowired - private PollableChannel dsMapChannel3; + @Autowired + private PollableChannel dsMapChannel3; - @Autowired - private PollableChannel dsMapChannel4; + @Autowired + private PollableChannel dsMapChannel4; - @Resource - private IMap dsDistributedMap1; + @Resource + private IMap dsDistributedMap1; - @Resource - private IMap dsDistributedMap2; + @Resource + private IMap dsDistributedMap2; - @Resource - private IMap dsDistributedMap3; + @Resource + private IMap dsDistributedMap3; - @Resource - private IMap dsDistributedMap4; + @Resource + private IMap dsDistributedMap4; - @Test - public void testDistributedSQLForOnlyENTRYIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForENTRYIterationType(dsDistributedMap1, dsMapChannel1); - } + @Test + public void testDistributedSQLForOnlyENTRYIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForENTRYIterationType(dsDistributedMap1, dsMapChannel1); + } - @Test - public void testDistributedSQLForOnlyKEYIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForKEYIterationType(dsDistributedMap2, dsMapChannel2); - } + @Test + public void testDistributedSQLForOnlyKEYIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForKEYIterationType(dsDistributedMap2, dsMapChannel2); + } - @Test - public void testDistributedSQLForOnlyLOCAL_KEYIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForLOCAL_KEYIterationType(dsDistributedMap3, dsMapChannel3); - } + @Test + public void testDistributedSQLForOnlyLOCAL_KEYIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForLOCAL_KEYIterationType(dsDistributedMap3, dsMapChannel3); + } - @Test - public void testDistributedSQLForOnlyVALUEIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForVALUEIterationType(dsDistributedMap4, dsMapChannel4); - } + @Test + public void testDistributedSQLForOnlyVALUEIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForVALUEIterationType(dsDistributedMap4, dsMapChannel4); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java index ad9860d..abe2946 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,69 +46,69 @@ import com.hazelcast.core.ISet; @DirtiesContext public class HazelcastDistributedSetEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edSetChannel1; + @Autowired + private PollableChannel edSetChannel1; - @Autowired - private PollableChannel edSetChannel2; + @Autowired + private PollableChannel edSetChannel2; - @Autowired - private PollableChannel edSetChannel3; + @Autowired + private PollableChannel edSetChannel3; - @Resource - private ISet edDistributedSet1; + @Resource + private ISet edDistributedSet1; - @Resource - private ISet edDistributedSet2; + @Resource + private ISet edDistributedSet2; - @Resource - private ISet edDistributedSet3; + @Resource + private ISet edDistributedSet3; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - edDistributedSet1 - .add(new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - Message msg = - edSetChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.ADDED.toString(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); - Assert - .assertEquals(1, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); - Assert.assertEquals("TestName1", - (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); - Assert.assertEquals("TestSurname1", - (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); - } + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + edDistributedSet1 + .add(new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + Message msg = + edSetChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.ADDED.toString(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); + Assert + .assertEquals(1, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); + Assert.assertEquals("TestName1", + (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); + Assert.assertEquals("TestSurname1", + (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); + } - @Test - public void testEventDrivenForOnlyREMOVEDEntryEvent() { - HazelcastIntegrationTestUser user = - new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"); - edDistributedSet2.add(user); - edDistributedSet2.remove(user); - Message msg = - edSetChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.REMOVED.toString(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); - Assert - .assertEquals(2, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); - Assert.assertEquals("TestName2", - (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); - Assert.assertEquals("TestSurname2", - (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); - } + @Test + public void testEventDrivenForOnlyREMOVEDEntryEvent() { + HazelcastIntegrationTestUser user = + new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"); + edDistributedSet2.add(user); + edDistributedSet2.remove(user); + Message msg = + edSetChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.REMOVED.toString(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE).toString()); + Assert + .assertEquals(2, (((HazelcastIntegrationTestUser) msg.getPayload()).getId())); + Assert.assertEquals("TestName2", + (((HazelcastIntegrationTestUser) msg.getPayload()).getName())); + Assert.assertEquals("TestSurname2", + (((HazelcastIntegrationTestUser) msg.getPayload()).getSurname())); + } - @Test - public void testEventDrivenForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedCollectionItemEvents(edDistributedSet3, - edSetChannel3); - } + @Test + public void testEventDrivenForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedCollectionItemEvents(edDistributedSet3, + edSetChannel3); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java index 67a24c0..bd5dc2b 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,16 +42,16 @@ import com.hazelcast.core.ITopic; @DirtiesContext public class HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edTopicChannel1; + @Autowired + private PollableChannel edTopicChannel1; - @Resource - private ITopic edDistributedTopic1; + @Resource + private ITopic edDistributedTopic1; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForTopicMessageEvent(edDistributedTopic1, edTopicChannel1); - } + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForTopicMessageEvent(edDistributedTopic1, edTopicChannel1); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java index f4da8f1..d17ccf2 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,91 +49,91 @@ import com.hazelcast.core.MultiMap; @SuppressWarnings("unchecked") public class HazelcastMultiMapEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edMultiMapChannel1; + @Autowired + private PollableChannel edMultiMapChannel1; - @Autowired - private PollableChannel edMultiMapChannel2; + @Autowired + private PollableChannel edMultiMapChannel2; - @Autowired - private PollableChannel edMultiMapChannel3; + @Autowired + private PollableChannel edMultiMapChannel3; - @Resource - private MultiMap edMultiMap1; + @Resource + private MultiMap edMultiMap1; - @Resource - private MultiMap edMultiMap2; + @Resource + private MultiMap edMultiMap2; - @Resource - private MultiMap edMultiMap3; + @Resource + private MultiMap edMultiMap3; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - edMultiMap1 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - Message msg = - edMultiMapChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.ADDED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edMultiMap1", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + edMultiMap1 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + Message msg = + edMultiMapChannel1.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.ADDED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edMultiMap1", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(1), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertEquals(1, - (((EntryEventMessagePayload) msg - .getPayload()).value).getId()); - Assert.assertEquals("TestName1", - (((EntryEventMessagePayload) msg - .getPayload()).value).getName()); - Assert.assertEquals("TestSurname1", - (((EntryEventMessagePayload) msg - .getPayload()).value).getSurname()); - } + Assert.assertEquals(Integer.valueOf(1), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertEquals(1, + (((EntryEventMessagePayload) msg + .getPayload()).value).getId()); + Assert.assertEquals("TestName1", + (((EntryEventMessagePayload) msg + .getPayload()).value).getName()); + Assert.assertEquals("TestSurname1", + (((EntryEventMessagePayload) msg + .getPayload()).value).getSurname()); + } - @Test - public void testEventDrivenForOnlyREMOVEDEntryEvent() { - edMultiMap2 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - edMultiMap2 - .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - edMultiMap2.remove(2); - Message msg = - edMultiMapChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.REMOVED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edMultiMap2", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testEventDrivenForOnlyREMOVEDEntryEvent() { + edMultiMap2 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + edMultiMap2 + .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + edMultiMap2.remove(2); + Message msg = + edMultiMapChannel2.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.REMOVED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edMultiMap2", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(2), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertNull(((EntryEventMessagePayload) msg.getPayload()).value); - Assert.assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - Assert.assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - Assert.assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - } + Assert.assertEquals(Integer.valueOf(2), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertNull(((EntryEventMessagePayload) msg.getPayload()).value); + Assert.assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + Assert.assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + Assert.assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + } - @Test - public void testEventDrivenForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForMultiMapEntryEvents(edMultiMap3, edMultiMapChannel3, - "edMultiMap3"); - } + @Test + public void testEventDrivenForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForMultiMapEntryEvents(edMultiMap3, edMultiMapChannel3, + "edMultiMap3"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java index 8b4cb7d..4602eb1 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,137 +48,137 @@ import com.hazelcast.core.ReplicatedMap; @SuppressWarnings("unchecked") public class HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests { - @Autowired - private PollableChannel edReplicatedMapChannel1; + @Autowired + private PollableChannel edReplicatedMapChannel1; - @Autowired - private PollableChannel edReplicatedMapChannel2; + @Autowired + private PollableChannel edReplicatedMapChannel2; - @Autowired - private PollableChannel edReplicatedMapChannel3; + @Autowired + private PollableChannel edReplicatedMapChannel3; - @Autowired - private PollableChannel edReplicatedMapChannel4; + @Autowired + private PollableChannel edReplicatedMapChannel4; - @Resource - private ReplicatedMap edReplicatedMap1; + @Resource + private ReplicatedMap edReplicatedMap1; - @Resource - private ReplicatedMap edReplicatedMap2; + @Resource + private ReplicatedMap edReplicatedMap2; - @Resource - private ReplicatedMap edReplicatedMap3; + @Resource + private ReplicatedMap edReplicatedMap3; - @Resource - private ReplicatedMap edReplicatedMap4; + @Resource + private ReplicatedMap edReplicatedMap4; - @Test - public void testEventDrivenForOnlyADDEDEntryEvent() { - edReplicatedMap1 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - Message msg = edReplicatedMapChannel1 - .receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.ADDED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edReplicatedMap1", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testEventDrivenForOnlyADDEDEntryEvent() { + edReplicatedMap1 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + Message msg = edReplicatedMapChannel1 + .receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.ADDED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edReplicatedMap1", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(1), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertEquals(1, - (((EntryEventMessagePayload) msg - .getPayload()).value).getId()); - Assert.assertEquals("TestName1", - (((EntryEventMessagePayload) msg - .getPayload()).value).getName()); - Assert.assertEquals("TestSurname1", - (((EntryEventMessagePayload) msg - .getPayload()).value).getSurname()); - } + Assert.assertEquals(Integer.valueOf(1), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertEquals(1, + (((EntryEventMessagePayload) msg + .getPayload()).value).getId()); + Assert.assertEquals("TestName1", + (((EntryEventMessagePayload) msg + .getPayload()).value).getName()); + Assert.assertEquals("TestSurname1", + (((EntryEventMessagePayload) msg + .getPayload()).value).getSurname()); + } - @Test - public void testEventDrivenForOnlyUPDATEDEntryEvent() { - edReplicatedMap2 - .put(2, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - edReplicatedMap2 - .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - Message msg = edReplicatedMapChannel2 - .receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); + @Test + public void testEventDrivenForOnlyUPDATEDEntryEvent() { + edReplicatedMap2 + .put(2, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + edReplicatedMap2 + .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + Message msg = edReplicatedMapChannel2 + .receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.UPDATED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edReplicatedMap2", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.UPDATED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edReplicatedMap2", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(2), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertEquals(1, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - Assert.assertEquals("TestName1", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - Assert.assertEquals("TestSurname1", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - Assert.assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).value).getId()); - Assert.assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).value).getName()); - Assert.assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).value).getSurname()); - } + Assert.assertEquals(Integer.valueOf(2), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertEquals(1, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + Assert.assertEquals("TestName1", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + Assert.assertEquals("TestSurname1", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + Assert.assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).value).getId()); + Assert.assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).value).getName()); + Assert.assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).value).getSurname()); + } - @Test - public void testEventDrivenForOnlyREMOVEDEntryEvent() { - edReplicatedMap3 - .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); - edReplicatedMap3 - .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); - edReplicatedMap3.remove(2); - Message msg = edReplicatedMapChannel3 - .receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - Assert.assertNotNull(msg); - Assert.assertNotNull(msg.getPayload()); - Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); - Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); - Assert.assertEquals(EntryEventType.REMOVED.name(), - msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); - Assert.assertEquals("edReplicatedMap3", - msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); + @Test + public void testEventDrivenForOnlyREMOVEDEntryEvent() { + edReplicatedMap3 + .put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1")); + edReplicatedMap3 + .put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2")); + edReplicatedMap3.remove(2); + Message msg = edReplicatedMapChannel3 + .receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); + Assert.assertNotNull(msg); + Assert.assertNotNull(msg.getPayload()); + Assert.assertTrue(msg.getPayload() instanceof EntryEventMessagePayload); + Assert.assertNotNull(msg.getHeaders().get(HazelcastHeaders.MEMBER)); + Assert.assertEquals(EntryEventType.REMOVED.name(), + msg.getHeaders().get(HazelcastHeaders.EVENT_TYPE)); + Assert.assertEquals("edReplicatedMap3", + msg.getHeaders().get(HazelcastHeaders.CACHE_NAME)); - Assert.assertEquals(Integer.valueOf(2), - ((EntryEventMessagePayload) msg - .getPayload()).key); - Assert.assertEquals(2, - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getId()); - Assert.assertEquals("TestName2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getName()); - Assert.assertEquals("TestSurname2", - (((EntryEventMessagePayload) msg - .getPayload()).oldValue).getSurname()); - } + Assert.assertEquals(Integer.valueOf(2), + ((EntryEventMessagePayload) msg + .getPayload()).key); + Assert.assertEquals(2, + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getId()); + Assert.assertEquals("TestName2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getName()); + Assert.assertEquals("TestSurname2", + (((EntryEventMessagePayload) msg + .getPayload()).oldValue).getSurname()); + } - @Test - public void testEventDrivenForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForReplicatedMapEntryEvents(edReplicatedMap4, - edReplicatedMapChannel4, "edReplicatedMap4"); - } + @Test + public void testEventDrivenForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForReplicatedMapEntryEvents(edReplicatedMap4, + edReplicatedMapChannel4, "edReplicatedMap4"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java index 418bffc..cb98e9c 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,48 +40,48 @@ import com.hazelcast.core.IMap; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = HazelcastIntegrationInboundTestConfiguration.class, - loader = AnnotationConfigContextLoader.class) + loader = AnnotationConfigContextLoader.class) @DirtiesContext public class HazelcastCQDistributedMapInboundChannelAdapterConfigTests { - @Autowired - private PollableChannel cqDistributedMapChannel1; + @Autowired + private PollableChannel cqDistributedMapChannel1; - @Autowired - private PollableChannel cqDistributedMapChannel2; + @Autowired + private PollableChannel cqDistributedMapChannel2; - @Autowired - private PollableChannel cqDistributedMapChannel3; + @Autowired + private PollableChannel cqDistributedMapChannel3; - @Resource - private IMap testCQDistributedMap1; + @Resource + private IMap testCQDistributedMap1; - @Resource - private IMap testCQDistributedMap2; + @Resource + private IMap testCQDistributedMap2; - @Resource - private IMap testCQDistributedMap3; + @Resource + private IMap testCQDistributedMap3; - @Test - public void testContinuousQueryForADDEDEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForADDEDDistributedMapEntryEvent(testCQDistributedMap1, - cqDistributedMapChannel1, "Test_CQ_Distributed_Map1"); - } + @Test + public void testContinuousQueryForADDEDEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForADDEDDistributedMapEntryEvent(testCQDistributedMap1, + cqDistributedMapChannel1, "Test_CQ_Distributed_Map1"); + } - @Test - public void testContinuousQueryForALLEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedMapEntryEvents(testCQDistributedMap2, - cqDistributedMapChannel2, "Test_CQ_Distributed_Map2"); - } + @Test + public void testContinuousQueryForALLEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedMapEntryEvents(testCQDistributedMap2, + cqDistributedMapChannel2, "Test_CQ_Distributed_Map2"); + } - @Test - public void testContinuousQueryForUPDATEDEntryEventWhenIncludeValueIsFalse() { - HazelcastInboundChannelAdapterTestUtils - .testContinuousQueryForUPDATEDEntryEventWhenIncludeValueIsFalse( - testCQDistributedMap3, cqDistributedMapChannel3, - "Test_CQ_Distributed_Map3"); - } + @Test + public void testContinuousQueryForUPDATEDEntryEventWhenIncludeValueIsFalse() { + HazelcastInboundChannelAdapterTestUtils + .testContinuousQueryForUPDATEDEntryEventWhenIncludeValueIsFalse( + testCQDistributedMap3, cqDistributedMapChannel3, + "Test_CQ_Distributed_Map3"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java index 9c1a441..f148326 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,27 +39,27 @@ import com.hazelcast.core.HazelcastInstance; @DirtiesContext public class HazelcastClusterMonitorInboundChannelAdapterConfigTests { - @Autowired - private PollableChannel cmonChannel; + @Autowired + private PollableChannel cmonChannel; - @Autowired - private PollableChannel cmonChannel2; + @Autowired + private PollableChannel cmonChannel2; - @Autowired - private HazelcastInstance testHazelcastInstance; + @Autowired + private HazelcastInstance testHazelcastInstance; - @Test - public void testConfigDrivenMembershipEvent() { - HazelcastInboundChannelAdapterTestUtils - .testMembershipEvent(testHazelcastInstance, cmonChannel, "testKey1", - "testValue1"); - } + @Test + public void testConfigDrivenMembershipEvent() { + HazelcastInboundChannelAdapterTestUtils + .testMembershipEvent(testHazelcastInstance, cmonChannel, "testKey1", + "testValue1"); + } - @Test - public void testConfigDrivenDistributedObjectEvent() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedObjectEventByChannelAndHazelcastInstance(cmonChannel2, - testHazelcastInstance, "Test_Distributed_Map3"); - } + @Test + public void testConfigDrivenDistributedObjectEvent() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedObjectEventByChannelAndHazelcastInstance(cmonChannel2, + testHazelcastInstance, "Test_Distributed_Map3"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java index cf07e40..b71617f 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,60 +40,60 @@ import com.hazelcast.core.IMap; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = HazelcastIntegrationInboundTestConfiguration.class, - loader = AnnotationConfigContextLoader.class) + loader = AnnotationConfigContextLoader.class) @DirtiesContext public class HazelcastDistributedSQLInboundChannelAdapterConfigTests { - @Autowired - private PollableChannel dsDistributedMapChannel; + @Autowired + private PollableChannel dsDistributedMapChannel; - @Autowired - private PollableChannel dsDistributedMapChannel2; + @Autowired + private PollableChannel dsDistributedMapChannel2; - @Autowired - private PollableChannel dsDistributedMapChannel3; + @Autowired + private PollableChannel dsDistributedMapChannel3; - @Autowired - private PollableChannel dsDistributedMapChannel4; + @Autowired + private PollableChannel dsDistributedMapChannel4; - @Resource - private IMap testDSDistributedMap; + @Resource + private IMap testDSDistributedMap; - @Resource - private IMap testDSDistributedMap2; + @Resource + private IMap testDSDistributedMap2; - @Resource - private IMap testDSDistributedMap3; + @Resource + private IMap testDSDistributedMap3; - @Resource - private IMap testDSDistributedMap4; + @Resource + private IMap testDSDistributedMap4; - @Test - public void testDistributedSQLForENTRYIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForENTRYIterationType(testDSDistributedMap, - dsDistributedMapChannel); - } + @Test + public void testDistributedSQLForENTRYIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForENTRYIterationType(testDSDistributedMap, + dsDistributedMapChannel); + } - @Test - public void testDistributedSQLForKEYIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForKEYIterationType(testDSDistributedMap2, - dsDistributedMapChannel2); - } + @Test + public void testDistributedSQLForKEYIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForKEYIterationType(testDSDistributedMap2, + dsDistributedMapChannel2); + } - @Test - public void testDistributedSQLForLOCAL_KEYIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForLOCAL_KEYIterationType(testDSDistributedMap3, - dsDistributedMapChannel3); - } + @Test + public void testDistributedSQLForLOCAL_KEYIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForLOCAL_KEYIterationType(testDSDistributedMap3, + dsDistributedMapChannel3); + } - @Test - public void testDistributedSQLForVALUEIterationType() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedSQLForVALUEIterationType(testDSDistributedMap4, - dsDistributedMapChannel4); - } + @Test + public void testDistributedSQLForVALUEIterationType() { + HazelcastInboundChannelAdapterTestUtils + .testDistributedSQLForVALUEIterationType(testDSDistributedMap4, + dsDistributedMapChannel4); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java index 0c3ed1d..24f712b 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,111 +46,111 @@ import com.hazelcast.core.ReplicatedMap; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = HazelcastIntegrationInboundTestConfiguration.class, - loader = AnnotationConfigContextLoader.class) + loader = AnnotationConfigContextLoader.class) @DirtiesContext public class HazelcastEventDrivenInboundChannelAdapterConfigTests { - @Autowired - private PollableChannel distributedMapChannel; + @Autowired + private PollableChannel distributedMapChannel; - @Autowired - private PollableChannel distributedMapChannel2; + @Autowired + private PollableChannel distributedMapChannel2; - @Autowired - private PollableChannel distributedListChannel; + @Autowired + private PollableChannel distributedListChannel; - @Autowired - private PollableChannel distributedSetChannel; + @Autowired + private PollableChannel distributedSetChannel; - @Autowired - private PollableChannel distributedQueueChannel; + @Autowired + private PollableChannel distributedQueueChannel; - @Autowired - private PollableChannel topicChannel; + @Autowired + private PollableChannel topicChannel; - @Autowired - private PollableChannel replicatedMapChannel; + @Autowired + private PollableChannel replicatedMapChannel; - @Autowired - private PollableChannel multiMapChannel; + @Autowired + private PollableChannel multiMapChannel; - @Resource - private IMap testDistributedMap; + @Resource + private IMap testDistributedMap; - @Resource - private IMap testDistributedMap2; + @Resource + private IMap testDistributedMap2; - @Resource - private IList testDistributedList; + @Resource + private IList testDistributedList; - @Resource - private ISet testDistributedSet; + @Resource + private ISet testDistributedSet; - @Resource - private IQueue testDistributedQueue; + @Resource + private IQueue testDistributedQueue; - @Resource - private ITopic testTopic; + @Resource + private ITopic testTopic; - @Resource - private ReplicatedMap testReplicatedMap; + @Resource + private ReplicatedMap testReplicatedMap; - @Resource - private MultiMap testMultiMap; + @Resource + private MultiMap testMultiMap; - @Test - public void testEventDrivenForADDEDEntryEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForADDEDDistributedMapEntryEvent(testDistributedMap, - distributedMapChannel, "Test_Distributed_Map"); - } + @Test + public void testEventDrivenForADDEDEntryEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForADDEDDistributedMapEntryEvent(testDistributedMap, + distributedMapChannel, "Test_Distributed_Map"); + } - @Test - public void testEventDrivenForEntryEvents() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedMapEntryEvents(testDistributedMap2, - distributedMapChannel2, "Test_Distributed_Map2"); - } + @Test + public void testEventDrivenForEntryEvents() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedMapEntryEvents(testDistributedMap2, + distributedMapChannel2, "Test_Distributed_Map2"); + } - @Test - public void testEventDrivenForDistributedListItemEvents() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedCollectionItemEvents(testDistributedList, - distributedListChannel); - } + @Test + public void testEventDrivenForDistributedListItemEvents() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedCollectionItemEvents(testDistributedList, + distributedListChannel); + } - @Test - public void testEventDrivenForDistributedSetItemEvents() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedCollectionItemEvents(testDistributedSet, - distributedSetChannel); - } + @Test + public void testEventDrivenForDistributedSetItemEvents() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedCollectionItemEvents(testDistributedSet, + distributedSetChannel); + } - @Test - public void testEventDrivenForDistributedQueueItemEvents() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForDistributedCollectionItemEvents(testDistributedQueue, - distributedQueueChannel); - } + @Test + public void testEventDrivenForDistributedQueueItemEvents() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForDistributedCollectionItemEvents(testDistributedQueue, + distributedQueueChannel); + } - @Test - public void testEventDrivenForADDEDMessageEvent() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForTopicMessageEvent(testTopic, topicChannel); - } + @Test + public void testEventDrivenForADDEDMessageEvent() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForTopicMessageEvent(testTopic, topicChannel); + } - @Test - public void testEventDrivenForReplicatedMapEntryEvents() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForReplicatedMapEntryEvents(testReplicatedMap, - replicatedMapChannel, "Test_Replicated_Map"); - } + @Test + public void testEventDrivenForReplicatedMapEntryEvents() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForReplicatedMapEntryEvents(testReplicatedMap, + replicatedMapChannel, "Test_Replicated_Map"); + } - @Test - public void testEventDrivenForMultiMapEntryEvents() { - HazelcastInboundChannelAdapterTestUtils - .testEventDrivenForMultiMapEntryEvents(testMultiMap, multiMapChannel, - "Test_Multi_Map"); - } + @Test + public void testEventDrivenForMultiMapEntryEvents() { + HazelcastInboundChannelAdapterTestUtils + .testEventDrivenForMultiMapEntryEvents(testMultiMap, multiMapChannel, + "Test_Multi_Map"); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java index 6f0b214..5f5de3f 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,330 +50,330 @@ import com.hazelcast.core.ReplicatedMap; @EnableIntegration public class HazelcastIntegrationInboundTestConfiguration { - @Bean - public PollableChannel distributedMapChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel distributedMapChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel distributedMapChannel2() { - return new QueueChannel(); - } + @Bean + public PollableChannel distributedMapChannel2() { + return new QueueChannel(); + } - @Bean - public PollableChannel distributedListChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel distributedListChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel distributedSetChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel distributedSetChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel distributedQueueChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel distributedQueueChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel topicChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel topicChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel multiMapChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel multiMapChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel replicatedMapChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel replicatedMapChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel cqDistributedMapChannel1() { - return new QueueChannel(); - } + @Bean + public PollableChannel cqDistributedMapChannel1() { + return new QueueChannel(); + } - @Bean - public PollableChannel cqDistributedMapChannel2() { - return new QueueChannel(); - } + @Bean + public PollableChannel cqDistributedMapChannel2() { + return new QueueChannel(); + } - @Bean - public PollableChannel cqDistributedMapChannel3() { - return new QueueChannel(); - } + @Bean + public PollableChannel cqDistributedMapChannel3() { + return new QueueChannel(); + } - @Bean - public PollableChannel dsDistributedMapChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel dsDistributedMapChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel dsDistributedMapChannel2() { - return new QueueChannel(); - } + @Bean + public PollableChannel dsDistributedMapChannel2() { + return new QueueChannel(); + } - @Bean - public PollableChannel dsDistributedMapChannel3() { - return new QueueChannel(); - } + @Bean + public PollableChannel dsDistributedMapChannel3() { + return new QueueChannel(); + } - @Bean - public PollableChannel dsDistributedMapChannel4() { - return new QueueChannel(); - } + @Bean + public PollableChannel dsDistributedMapChannel4() { + return new QueueChannel(); + } - @Bean - public PollableChannel cmonChannel() { - return new QueueChannel(); - } + @Bean + public PollableChannel cmonChannel() { + return new QueueChannel(); + } - @Bean - public PollableChannel cmonChannel2() { - return new QueueChannel(); - } + @Bean + public PollableChannel cmonChannel2() { + return new QueueChannel(); + } - @Bean - public IMap testDistributedMap() { - return testHazelcastInstance().getMap("Test_Distributed_Map"); - } + @Bean + public IMap testDistributedMap() { + return testHazelcastInstance().getMap("Test_Distributed_Map"); + } - @Bean - public IMap testDistributedMap2() { - return testHazelcastInstance().getMap("Test_Distributed_Map2"); - } + @Bean + public IMap testDistributedMap2() { + return testHazelcastInstance().getMap("Test_Distributed_Map2"); + } - @Bean - public IList testDistributedList() { - return testHazelcastInstance().getList("Test_Distributed_List"); - } + @Bean + public IList testDistributedList() { + return testHazelcastInstance().getList("Test_Distributed_List"); + } - @Bean - public ISet testDistributedSet() { - return testHazelcastInstance().getSet("Test_Distributed_Set"); - } + @Bean + public ISet testDistributedSet() { + return testHazelcastInstance().getSet("Test_Distributed_Set"); + } - @Bean - public IQueue testDistributedQueue() { - return testHazelcastInstance().getQueue("Test_Distributed_Queue"); - } + @Bean + public IQueue testDistributedQueue() { + return testHazelcastInstance().getQueue("Test_Distributed_Queue"); + } - @Bean - public ITopic testTopic() { - return testHazelcastInstance().getTopic("Test_Topic"); - } + @Bean + public ITopic testTopic() { + return testHazelcastInstance().getTopic("Test_Topic"); + } - @Bean - public MultiMap testMultiMap() { - return testHazelcastInstance().getMultiMap("Test_Multi_Map"); - } + @Bean + public MultiMap testMultiMap() { + return testHazelcastInstance().getMultiMap("Test_Multi_Map"); + } - @Bean - public ReplicatedMap testReplicatedMap() { - return testHazelcastInstance().getReplicatedMap("Test_Replicated_Map"); - } + @Bean + public ReplicatedMap testReplicatedMap() { + return testHazelcastInstance().getReplicatedMap("Test_Replicated_Map"); + } - @Bean - public IMap testCQDistributedMap1() { - return testHazelcastInstance().getMap("Test_CQ_Distributed_Map1"); - } + @Bean + public IMap testCQDistributedMap1() { + return testHazelcastInstance().getMap("Test_CQ_Distributed_Map1"); + } - @Bean - public IMap testCQDistributedMap2() { - return testHazelcastInstance().getMap("Test_CQ_Distributed_Map2"); - } + @Bean + public IMap testCQDistributedMap2() { + return testHazelcastInstance().getMap("Test_CQ_Distributed_Map2"); + } - @Bean - public IMap testCQDistributedMap3() { - return testHazelcastInstance().getMap("Test_CQ_Distributed_Map3"); - } + @Bean + public IMap testCQDistributedMap3() { + return testHazelcastInstance().getMap("Test_CQ_Distributed_Map3"); + } - @Bean - public IMap testDSDistributedMap() { - return testHazelcastInstance().getMap("Test_DS_Distributed_Map"); - } + @Bean + public IMap testDSDistributedMap() { + return testHazelcastInstance().getMap("Test_DS_Distributed_Map"); + } - @Bean - public IMap testDSDistributedMap2() { - return testHazelcastInstance().getMap("Test_DS_Distributed_Map2"); - } + @Bean + public IMap testDSDistributedMap2() { + return testHazelcastInstance().getMap("Test_DS_Distributed_Map2"); + } - @Bean - public IMap testDSDistributedMap3() { - return testHazelcastInstance().getMap("Test_DS_Distributed_Map3"); - } + @Bean + public IMap testDSDistributedMap3() { + return testHazelcastInstance().getMap("Test_DS_Distributed_Map3"); + } - @Bean - public IMap testDSDistributedMap4() { - return testHazelcastInstance().getMap("Test_DS_Distributed_Map4"); - } + @Bean + public IMap testDSDistributedMap4() { + return testHazelcastInstance().getMap("Test_DS_Distributed_Map4"); + } - @Bean - public HazelcastInstance testHazelcastInstance() { - return Hazelcast.newHazelcastInstance(); - } + @Bean + public HazelcastInstance testHazelcastInstance() { + return Hazelcast.newHazelcastInstance(); + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testDistributedMap()); - producer.setOutputChannel(distributedMapChannel()); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testDistributedMap()); + producer.setOutputChannel(distributedMapChannel()); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer2() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testDistributedMap2()); - producer.setOutputChannel(distributedMapChannel2()); - producer.setCacheEventTypes("ADDED,REMOVED,UPDATED,CLEAR_ALL"); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer2() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testDistributedMap2()); + producer.setOutputChannel(distributedMapChannel2()); + producer.setCacheEventTypes("ADDED,REMOVED,UPDATED,CLEAR_ALL"); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer3() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testDistributedList()); - producer.setOutputChannel(distributedListChannel()); - producer.setCacheEventTypes("ADDED,REMOVED"); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer3() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testDistributedList()); + producer.setOutputChannel(distributedListChannel()); + producer.setCacheEventTypes("ADDED,REMOVED"); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer4() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testDistributedSet()); - producer.setOutputChannel(distributedSetChannel()); - producer.setCacheEventTypes("ADDED,REMOVED"); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer4() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testDistributedSet()); + producer.setOutputChannel(distributedSetChannel()); + producer.setCacheEventTypes("ADDED,REMOVED"); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer5() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testDistributedQueue()); - producer.setOutputChannel(distributedQueueChannel()); - producer.setCacheEventTypes("ADDED,REMOVED"); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer5() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testDistributedQueue()); + producer.setOutputChannel(distributedQueueChannel()); + producer.setCacheEventTypes("ADDED,REMOVED"); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer6() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testTopic()); - producer.setOutputChannel(topicChannel()); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer6() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testTopic()); + producer.setOutputChannel(topicChannel()); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer7() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testReplicatedMap()); - producer.setOutputChannel(replicatedMapChannel()); - producer.setCacheEventTypes("ADDED,REMOVED,UPDATED"); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer7() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testReplicatedMap()); + producer.setOutputChannel(replicatedMapChannel()); + producer.setCacheEventTypes("ADDED,REMOVED,UPDATED"); + return producer; + } - @Bean - public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer8() { - final HazelcastEventDrivenMessageProducer producer = - new HazelcastEventDrivenMessageProducer(testMultiMap()); - producer.setOutputChannel(multiMapChannel()); - producer.setCacheEventTypes("ADDED,REMOVED,CLEAR_ALL"); - return producer; - } + @Bean + public HazelcastEventDrivenMessageProducer hazelcastEventDrivenMessageProducer8() { + final HazelcastEventDrivenMessageProducer producer = + new HazelcastEventDrivenMessageProducer(testMultiMap()); + producer.setOutputChannel(multiMapChannel()); + producer.setCacheEventTypes("ADDED,REMOVED,CLEAR_ALL"); + return producer; + } - @Bean - public HazelcastContinuousQueryMessageProducer hazelcastContinuousQueryMessageProducer() { - final HazelcastContinuousQueryMessageProducer producer = - new HazelcastContinuousQueryMessageProducer(testCQDistributedMap1(), - "name=TestName1"); - producer.setOutputChannel(cqDistributedMapChannel1()); - return producer; - } + @Bean + public HazelcastContinuousQueryMessageProducer hazelcastContinuousQueryMessageProducer() { + final HazelcastContinuousQueryMessageProducer producer = + new HazelcastContinuousQueryMessageProducer(testCQDistributedMap1(), + "name=TestName1"); + producer.setOutputChannel(cqDistributedMapChannel1()); + return producer; + } - @Bean - public HazelcastContinuousQueryMessageProducer hazelcastContinuousQueryMessageProducer2() { - final HazelcastContinuousQueryMessageProducer producer = - new HazelcastContinuousQueryMessageProducer(testCQDistributedMap2(), - "name=TestName1 OR name=TestName2"); - producer.setOutputChannel(cqDistributedMapChannel2()); - producer.setCacheEventTypes("ADDED,REMOVED,UPDATED,CLEAR_ALL"); - return producer; - } + @Bean + public HazelcastContinuousQueryMessageProducer hazelcastContinuousQueryMessageProducer2() { + final HazelcastContinuousQueryMessageProducer producer = + new HazelcastContinuousQueryMessageProducer(testCQDistributedMap2(), + "name=TestName1 OR name=TestName2"); + producer.setOutputChannel(cqDistributedMapChannel2()); + producer.setCacheEventTypes("ADDED,REMOVED,UPDATED,CLEAR_ALL"); + return producer; + } - @Bean - public HazelcastContinuousQueryMessageProducer hazelcastContinuousQueryMessageProducer3() { - final HazelcastContinuousQueryMessageProducer producer = - new HazelcastContinuousQueryMessageProducer(testCQDistributedMap3(), - "surname=TestSurname2"); - producer.setOutputChannel(cqDistributedMapChannel3()); - producer.setCacheEventTypes("UPDATED"); - producer.setIncludeValue(false); - return producer; - } + @Bean + public HazelcastContinuousQueryMessageProducer hazelcastContinuousQueryMessageProducer3() { + final HazelcastContinuousQueryMessageProducer producer = + new HazelcastContinuousQueryMessageProducer(testCQDistributedMap3(), + "surname=TestSurname2"); + producer.setOutputChannel(cqDistributedMapChannel3()); + producer.setCacheEventTypes("UPDATED"); + producer.setIncludeValue(false); + return producer; + } - @Bean - public HazelcastClusterMonitorMessageProducer hazelcastClusterMonitorMessageProducer() { - final HazelcastClusterMonitorMessageProducer producer = - new HazelcastClusterMonitorMessageProducer(testHazelcastInstance()); - producer.setOutputChannel(cmonChannel()); - return producer; - } + @Bean + public HazelcastClusterMonitorMessageProducer hazelcastClusterMonitorMessageProducer() { + final HazelcastClusterMonitorMessageProducer producer = + new HazelcastClusterMonitorMessageProducer(testHazelcastInstance()); + producer.setOutputChannel(cmonChannel()); + return producer; + } - @Bean - public HazelcastClusterMonitorMessageProducer hazelcastClusterMonitorMessageProducer2() { - final HazelcastClusterMonitorMessageProducer producer = - new HazelcastClusterMonitorMessageProducer(testHazelcastInstance()); - producer.setOutputChannel(cmonChannel2()); - producer.setMonitorEventTypes("DISTRIBUTED_OBJECT"); - return producer; - } + @Bean + public HazelcastClusterMonitorMessageProducer hazelcastClusterMonitorMessageProducer2() { + final HazelcastClusterMonitorMessageProducer producer = + new HazelcastClusterMonitorMessageProducer(testHazelcastInstance()); + producer.setOutputChannel(cmonChannel2()); + producer.setMonitorEventTypes("DISTRIBUTED_OBJECT"); + return producer; + } - @Bean - @InboundChannelAdapter(value = "dsDistributedMapChannel", - poller = @Poller(maxMessagesPerPoll = "1")) - public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource() { - final HazelcastDistributedSQLMessageSource messageSource = - new HazelcastDistributedSQLMessageSource(testDSDistributedMap(), - "name='TestName4' AND surname='TestSurname4'"); - messageSource.setIterationType(DistributedSQLIterationType.ENTRY); - return messageSource; - } + @Bean + @InboundChannelAdapter(value = "dsDistributedMapChannel", + poller = @Poller(maxMessagesPerPoll = "1")) + public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource() { + final HazelcastDistributedSQLMessageSource messageSource = + new HazelcastDistributedSQLMessageSource(testDSDistributedMap(), + "name='TestName4' AND surname='TestSurname4'"); + messageSource.setIterationType(DistributedSQLIterationType.ENTRY); + return messageSource; + } - @Bean - @InboundChannelAdapter(value = "dsDistributedMapChannel2", - poller = @Poller(maxMessagesPerPoll = "1")) - public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource2() { - final HazelcastDistributedSQLMessageSource messageSource = - new HazelcastDistributedSQLMessageSource(testDSDistributedMap2(), - "name='TestName1' AND surname='TestSurname1'"); - messageSource.setIterationType(DistributedSQLIterationType.KEY); - return messageSource; - } + @Bean + @InboundChannelAdapter(value = "dsDistributedMapChannel2", + poller = @Poller(maxMessagesPerPoll = "1")) + public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource2() { + final HazelcastDistributedSQLMessageSource messageSource = + new HazelcastDistributedSQLMessageSource(testDSDistributedMap2(), + "name='TestName1' AND surname='TestSurname1'"); + messageSource.setIterationType(DistributedSQLIterationType.KEY); + return messageSource; + } - @Bean - @InboundChannelAdapter(value = "dsDistributedMapChannel3", - poller = @Poller(maxMessagesPerPoll = "1")) - public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource3() { - final HazelcastDistributedSQLMessageSource messageSource = - new HazelcastDistributedSQLMessageSource(testDSDistributedMap3(), - "age > 5"); - messageSource.setIterationType(DistributedSQLIterationType.LOCAL_KEY); - return messageSource; - } + @Bean + @InboundChannelAdapter(value = "dsDistributedMapChannel3", + poller = @Poller(maxMessagesPerPoll = "1")) + public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource3() { + final HazelcastDistributedSQLMessageSource messageSource = + new HazelcastDistributedSQLMessageSource(testDSDistributedMap3(), + "age > 5"); + messageSource.setIterationType(DistributedSQLIterationType.LOCAL_KEY); + return messageSource; + } - @Bean - @InboundChannelAdapter(value = "dsDistributedMapChannel4", - poller = @Poller(maxMessagesPerPoll = "1")) - public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource4() { - final HazelcastDistributedSQLMessageSource messageSource = - new HazelcastDistributedSQLMessageSource(testDSDistributedMap4(), - "name='TestName3' AND surname='TestSurname3'"); - messageSource.setIterationType(DistributedSQLIterationType.VALUE); - return messageSource; - } + @Bean + @InboundChannelAdapter(value = "dsDistributedMapChannel4", + poller = @Poller(maxMessagesPerPoll = "1")) + public HazelcastDistributedSQLMessageSource hazelcastDistributedSQLMessageSource4() { + final HazelcastDistributedSQLMessageSource messageSource = + new HazelcastDistributedSQLMessageSource(testDSDistributedMap4(), + "name='TestName3' AND surname='TestSurname3'"); + messageSource.setIterationType(DistributedSQLIterationType.VALUE); + return messageSource; + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java index 5f5fb90..817c0bf 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,17 +48,18 @@ import com.hazelcast.core.ReplicatedMap; import com.hazelcast.spi.exception.DistributedObjectDestroyedException; /** - * Util Class for Hazelcast Inbound Channel Adapters Test Support + * Util Class for Hazelcast Inbound Channel Adapters Test Support. + * * @author Eren Avsarogullari * @since 1.0.0 */ @SuppressWarnings("unchecked") -public class HazelcastInboundChannelAdapterTestUtils { +public final class HazelcastInboundChannelAdapterTestUtils { public static final int TIMEOUT = 20_000; public static void verifyEntryEvent(Message msg, String cacheName, - EntryEventType event) { + EntryEventType event) { Assert.assertNotNull(msg); Assert.assertNotNull(msg.getPayload()); if (event == EntryEventType.CLEAR_ALL || event == EntryEventType.EVICT_ALL) { @@ -348,7 +349,7 @@ public class HazelcastInboundChannelAdapterTestUtils { } public static void testMembershipEvent(final HazelcastInstance instance, - final PollableChannel channel, final String key, final String value) { + final PollableChannel channel, final String key, final String value) { Member member = instance.getCluster().getMembers().iterator().next(); member.setStringAttribute(key, value); @@ -380,7 +381,7 @@ public class HazelcastInboundChannelAdapterTestUtils { } private static void verifyMembershipEvent(final Message msg, - final int membershipEvent) { + final int membershipEvent) { assertNotNull(msg); assertNotNull(msg.getPayload()); assertTrue(msg.getPayload() instanceof MembershipEvent); @@ -390,8 +391,8 @@ public class HazelcastInboundChannelAdapterTestUtils { } private static void verifyDistributedObjectEvent(final Message msg, - final DistributedObjectEvent.EventType eventType, - final String distributedObjectName) { + final DistributedObjectEvent.EventType eventType, + final String distributedObjectName) { assertNotNull(msg); assertNotNull(msg.getPayload()); assertTrue(msg.getPayload() instanceof DistributedObjectEvent); @@ -401,4 +402,7 @@ public class HazelcastInboundChannelAdapterTestUtils { .getName(), distributedObjectName); } + private HazelcastInboundChannelAdapterTestUtils() { + } + } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java index d58c33c..e3f4311 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java @@ -1,11 +1,11 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + + package org.springframework.integration.hazelcast.leader; import static org.hamcrest.CoreMatchers.is; diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java index 8709c6a..dcd18a6 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ import com.hazelcast.core.MultiMap; import com.hazelcast.core.ReplicatedMap; /** - * Hazelcast Outbound Channel Adapter Test Class + * Hazelcast Outbound Channel Adapter Test Class. * * @author Eren Avsarogullari * @author Artem Bilan @@ -69,405 +69,405 @@ import com.hazelcast.core.ReplicatedMap; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration @DirtiesContext -@SuppressWarnings({"rawtypes", "unchecked"}) +@SuppressWarnings({ "rawtypes", "unchecked" }) public class HazelcastOutboundChannelAdapterTests { - private static final String DISTRIBUTED_MAP = "distributedMap"; + private static final String DISTRIBUTED_MAP = "distributedMap"; - private static final String CACHE_HEADER = "CACHE_HEADER"; + private static final String CACHE_HEADER = "CACHE_HEADER"; - private final MessageBuilderFactory messageBuilderFactory = - new DefaultMessageBuilderFactory(); + private final MessageBuilderFactory messageBuilderFactory = + new DefaultMessageBuilderFactory(); - @Autowired - @Qualifier("firstMapChannel") - private MessageChannel firstMapChannel; + @Autowired + @Qualifier("firstMapChannel") + private MessageChannel firstMapChannel; - @Autowired - @Qualifier("secondMapChannel") - private MessageChannel secondMapChannel; + @Autowired + @Qualifier("secondMapChannel") + private MessageChannel secondMapChannel; - @Autowired - @Qualifier("thirdMapChannel") - private MessageChannel thirdMapChannel; + @Autowired + @Qualifier("thirdMapChannel") + private MessageChannel thirdMapChannel; - @Autowired - @Qualifier("fourthMapChannel") - private MessageChannel fourthMapChannel; + @Autowired + @Qualifier("fourthMapChannel") + private MessageChannel fourthMapChannel; - @Autowired - @Qualifier("fifthMapChannel") - private MessageChannel fifthMapChannel; + @Autowired + @Qualifier("fifthMapChannel") + private MessageChannel fifthMapChannel; - @Autowired - @Qualifier("sixthMapChannel") - private MessageChannel sixthMapChannel; + @Autowired + @Qualifier("sixthMapChannel") + private MessageChannel sixthMapChannel; - @Autowired - @Qualifier("bulkMapChannel") - private MessageChannel bulkMapChannel; + @Autowired + @Qualifier("bulkMapChannel") + private MessageChannel bulkMapChannel; - @Autowired - @Qualifier("multiMapChannel") - private MessageChannel multiMapChannel; + @Autowired + @Qualifier("multiMapChannel") + private MessageChannel multiMapChannel; - @Autowired - @Qualifier("replicatedMapChannel") - private MessageChannel replicatedMapChannel; + @Autowired + @Qualifier("replicatedMapChannel") + private MessageChannel replicatedMapChannel; - @Autowired - @Qualifier("bulkReplicatedMapChannel") - private MessageChannel bulkReplicatedMapChannel; + @Autowired + @Qualifier("bulkReplicatedMapChannel") + private MessageChannel bulkReplicatedMapChannel; - @Autowired - @Qualifier("listChannel") - private MessageChannel listChannel; + @Autowired + @Qualifier("listChannel") + private MessageChannel listChannel; - @Autowired - @Qualifier("bulkListChannel") - private MessageChannel bulkListChannel; + @Autowired + @Qualifier("bulkListChannel") + private MessageChannel bulkListChannel; - @Autowired - @Qualifier("setChannel") - private MessageChannel setChannel; + @Autowired + @Qualifier("setChannel") + private MessageChannel setChannel; - @Autowired - @Qualifier("bulkSetChannel") - private MessageChannel bulkSetChannel; + @Autowired + @Qualifier("bulkSetChannel") + private MessageChannel bulkSetChannel; - @Autowired - @Qualifier("queueChannel") - private MessageChannel queueChannel; + @Autowired + @Qualifier("queueChannel") + private MessageChannel queueChannel; - @Autowired - @Qualifier("bulkQueueChannel") - private MessageChannel bulkQueueChannel; + @Autowired + @Qualifier("bulkQueueChannel") + private MessageChannel bulkQueueChannel; - @Autowired - @Qualifier("topicChannel") - private MessageChannel topicChannel; + @Autowired + @Qualifier("topicChannel") + private MessageChannel topicChannel; - @Autowired - @Qualifier("lockChannel") - private MessageChannel lockChannel; + @Autowired + @Qualifier("lockChannel") + private MessageChannel lockChannel; - @Resource - private Map distributedMap; + @Resource + private Map distributedMap; - @Resource - private Map distributedBulkMap; + @Resource + private Map distributedBulkMap; - @Resource - private MultiMap multiMap; + @Resource + private MultiMap multiMap; - @Resource - private ReplicatedMap replicatedMap; + @Resource + private ReplicatedMap replicatedMap; - @Resource - private ReplicatedMap bulkReplicatedMap; + @Resource + private ReplicatedMap bulkReplicatedMap; - @Resource - private List distributedList; + @Resource + private List distributedList; - @Resource - private List distributedBulkList; + @Resource + private List distributedBulkList; - @Resource - private Set distributedSet; - - @Resource - private Set distributedBulkSet; - - @Resource - private Queue distributedQueue; - - @Resource - private Queue distributedBulkQueue; - - @Resource - private ITopic topic; - - @Autowired - @Qualifier("testFirstMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testFirstMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testSecondMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testSecondMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testThirdMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testThirdMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testFourthMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testFourthMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testBulkMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testBulkMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testMultiMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testMultiMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testReplicatedMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testReplicatedMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testBulkReplicatedMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testBulkReplicatedMapRequestHandlerAdvice; - - @Autowired - @Qualifier("testListRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testListRequestHandlerAdvice; - - @Autowired - @Qualifier("testBulkListRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testBulkListRequestHandlerAdvice; - - @Autowired - @Qualifier("testSetRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testSetRequestHandlerAdvice; - - @Autowired - @Qualifier("testBulkSetRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testBulkSetRequestHandlerAdvice; - - @Autowired - @Qualifier("testQueueRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testQueueRequestHandlerAdvice; - - @Autowired - @Qualifier("testBulkQueueRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testBulkQueueRequestHandlerAdvice; - - @Autowired - @Qualifier("testTopicRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice testTopicRequestHandlerAdvice; - - @Before - public void setUp() { - this.distributedMap.clear(); - this.distributedBulkMap.clear(); - this.distributedList.clear(); - this.distributedBulkList.clear(); - this.distributedSet.clear(); - this.distributedBulkSet.clear(); - this.distributedQueue.clear(); - this.distributedBulkQueue.clear(); - this.multiMap.clear(); - this.replicatedMap.clear(); - this.bulkReplicatedMap.clear(); - } - - @Test - public void testWriteToDistributedMap() throws InterruptedException { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedMap(this.firstMapChannel, this.distributedMap, - this.testFirstMapRequestHandlerAdvice); - } - - @Test - public void testBulkWriteToDistributedMap() { - HazelcastOutboundChannelAdapterTestUtils - .testBulkWriteToDistributedMap(this.bulkMapChannel, this.distributedBulkMap, - this.testBulkMapRequestHandlerAdvice); - } - - @Test - public void testWriteToDistributedMapWhenCacheExpressionIsSet() - throws InterruptedException { - sendMessageWithCacheHeaderToChannel(this.secondMapChannel, CACHE_HEADER, - DISTRIBUTED_MAP); - assertTrue(this.testSecondMapRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - HazelcastOutboundChannelAdapterTestUtils - .verifyMapForPayload(new TreeMap(this.distributedMap)); - } - - @Test - public void testWriteToDistributedMapWhenHazelcastHeaderIsSet() - throws InterruptedException { - sendMessageWithCacheHeaderToChannel(this.thirdMapChannel, - HazelcastHeaders.CACHE_NAME, DISTRIBUTED_MAP); - assertTrue(this.testThirdMapRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - HazelcastOutboundChannelAdapterTestUtils - .verifyMapForPayload(new TreeMap(this.distributedMap)); - } - - @Test - public void testWriteToDistributedMapWhenExtractPayloadIsFalse() - throws InterruptedException { - sendMessageWithCacheHeaderToChannel(this.fourthMapChannel, - HazelcastHeaders.CACHE_NAME, DISTRIBUTED_MAP); - assertTrue(this.testFourthMapRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - verifyMapForMessage(new TreeMap(this.distributedMap)); - } - - @Test - public void testWriteToMultiMap() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToMultiMap(this.multiMapChannel, this.multiMap, - this.testMultiMapRequestHandlerAdvice); - } - - @Test - public void testWriteToReplicatedMap() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToReplicatedMap(this.replicatedMapChannel, this.replicatedMap, - this.testReplicatedMapRequestHandlerAdvice); - } - - @Test - public void testBulkWriteToReplicatedMap() throws InterruptedException { - Map userMap = - new HashMap<>(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - for (int index = 1; - index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { - userMap - .put(index, HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); - } - - this.bulkReplicatedMapChannel.send(new GenericMessage<>(userMap)); - - assertTrue(this.testBulkReplicatedMapRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - HazelcastOutboundChannelAdapterTestUtils - .verifyMapForPayload(new TreeMap(this.bulkReplicatedMap)); - } - - - @Test - public void testWriteToDistributedList() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedList(this.listChannel, this.distributedList, - this.testListRequestHandlerAdvice); - } - - @Test - public void testBulkWriteToDistributedList() throws InterruptedException { - List userList = - new ArrayList<>(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - for (int index = 1; - index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { - userList.add(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); - } - - this.bulkListChannel.send(new GenericMessage<>(userList)); - - assertTrue(this.testBulkListRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - HazelcastOutboundChannelAdapterTestUtils - .verifyCollection(this.distributedBulkList, - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } - - @Test - public void testWriteToDistributedSet() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedSet(this.setChannel, this.distributedSet, - this.testSetRequestHandlerAdvice); - } - - @Test - public void testBulkWriteToDistributedSet() throws InterruptedException { - Set userSet = - new HashSet<>(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - for (int index = 1; - index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { - userSet.add(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); - } - - this.bulkSetChannel.send(new GenericMessage<>(userSet)); - - assertTrue(this.testBulkSetRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - final List list = - new ArrayList(this.distributedBulkSet); - Collections.sort(list); - HazelcastOutboundChannelAdapterTestUtils - .verifyCollection(list, HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } - - @Test - public void testWriteToDistributedQueue() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedQueue(this.queueChannel, this.distributedQueue, - this.testQueueRequestHandlerAdvice); - } - - @Test - public void testBulkWriteToDistributedQueue() throws InterruptedException { - Queue userQueue = - new ArrayBlockingQueue(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - for (int index = 1; - index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { - userQueue.add(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); - } - - this.bulkQueueChannel.send(new GenericMessage<>(userQueue)); - - assertTrue(this.testBulkQueueRequestHandlerAdvice.executeLatch - .await(10, TimeUnit.SECONDS)); - HazelcastOutboundChannelAdapterTestUtils - .verifyCollection(this.distributedBulkQueue, - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } - - @Test - public void testWriteToTopic() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToTopic(this.topicChannel, this.topic, - this.testTopicRequestHandlerAdvice); - } - - @Test(expected = MessageHandlingException.class) - public void testWriteToDistributedMapWhenCacheIsNotSet() { - this.fifthMapChannel.send(new GenericMessage<>( - HazelcastOutboundChannelAdapterTestUtils.getTestUser(1))); - } - - @Test(expected = MessageHandlingException.class) - public void testWriteToDistributedMapWhenKeyExpressionIsNotSet() { - Message message = this.messageBuilderFactory - .withPayload(HazelcastOutboundChannelAdapterTestUtils.getTestUser(1)) - .setHeader(HazelcastHeaders.CACHE_NAME, DISTRIBUTED_MAP).build(); - this.sixthMapChannel.send(message); - } - - @Test(expected = MessageHandlingException.class) - public void testWriteToLock() { - this.lockChannel.send(new GenericMessage<>("foo")); - } - - private void sendMessageWithCacheHeaderToChannel(final MessageChannel channel, - final String headerName, final String distributedObjectName) { - for (int index = 1; - index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { - Message message = this.messageBuilderFactory - .withPayload(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)) - .setHeader(headerName, distributedObjectName).build(); - channel.send(message); - } - } - - private void verifyMapForMessage( - final Map> map) { - int index = 1; - assertNotNull(map); - assertEquals(true, map.size() == HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - for (Entry> entry : map.entrySet()) { - assertNotNull(entry); - assertEquals(index, entry.getKey().intValue()); - assertTrue(entry.getValue().getHeaders().size() > 0); - HazelcastOutboundChannelAdapterTestUtils - .verifyHazelcastIntegrationTestUser(entry.getValue().getPayload(), index); - index++; - } - } + @Resource + private Set distributedSet; + + @Resource + private Set distributedBulkSet; + + @Resource + private Queue distributedQueue; + + @Resource + private Queue distributedBulkQueue; + + @Resource + private ITopic topic; + + @Autowired + @Qualifier("testFirstMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testFirstMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testSecondMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testSecondMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testThirdMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testThirdMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testFourthMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testFourthMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testBulkMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testBulkMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testMultiMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testMultiMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testReplicatedMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testReplicatedMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testBulkReplicatedMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testBulkReplicatedMapRequestHandlerAdvice; + + @Autowired + @Qualifier("testListRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testListRequestHandlerAdvice; + + @Autowired + @Qualifier("testBulkListRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testBulkListRequestHandlerAdvice; + + @Autowired + @Qualifier("testSetRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testSetRequestHandlerAdvice; + + @Autowired + @Qualifier("testBulkSetRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testBulkSetRequestHandlerAdvice; + + @Autowired + @Qualifier("testQueueRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testQueueRequestHandlerAdvice; + + @Autowired + @Qualifier("testBulkQueueRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testBulkQueueRequestHandlerAdvice; + + @Autowired + @Qualifier("testTopicRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice testTopicRequestHandlerAdvice; + + @Before + public void setUp() { + this.distributedMap.clear(); + this.distributedBulkMap.clear(); + this.distributedList.clear(); + this.distributedBulkList.clear(); + this.distributedSet.clear(); + this.distributedBulkSet.clear(); + this.distributedQueue.clear(); + this.distributedBulkQueue.clear(); + this.multiMap.clear(); + this.replicatedMap.clear(); + this.bulkReplicatedMap.clear(); + } + + @Test + public void testWriteToDistributedMap() throws InterruptedException { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedMap(this.firstMapChannel, this.distributedMap, + this.testFirstMapRequestHandlerAdvice); + } + + @Test + public void testBulkWriteToDistributedMap() { + HazelcastOutboundChannelAdapterTestUtils + .testBulkWriteToDistributedMap(this.bulkMapChannel, this.distributedBulkMap, + this.testBulkMapRequestHandlerAdvice); + } + + @Test + public void testWriteToDistributedMapWhenCacheExpressionIsSet() + throws InterruptedException { + sendMessageWithCacheHeaderToChannel(this.secondMapChannel, CACHE_HEADER, + DISTRIBUTED_MAP); + assertTrue(this.testSecondMapRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + HazelcastOutboundChannelAdapterTestUtils + .verifyMapForPayload(new TreeMap(this.distributedMap)); + } + + @Test + public void testWriteToDistributedMapWhenHazelcastHeaderIsSet() + throws InterruptedException { + sendMessageWithCacheHeaderToChannel(this.thirdMapChannel, + HazelcastHeaders.CACHE_NAME, DISTRIBUTED_MAP); + assertTrue(this.testThirdMapRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + HazelcastOutboundChannelAdapterTestUtils + .verifyMapForPayload(new TreeMap(this.distributedMap)); + } + + @Test + public void testWriteToDistributedMapWhenExtractPayloadIsFalse() + throws InterruptedException { + sendMessageWithCacheHeaderToChannel(this.fourthMapChannel, + HazelcastHeaders.CACHE_NAME, DISTRIBUTED_MAP); + assertTrue(this.testFourthMapRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + verifyMapForMessage(new TreeMap(this.distributedMap)); + } + + @Test + public void testWriteToMultiMap() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToMultiMap(this.multiMapChannel, this.multiMap, + this.testMultiMapRequestHandlerAdvice); + } + + @Test + public void testWriteToReplicatedMap() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToReplicatedMap(this.replicatedMapChannel, this.replicatedMap, + this.testReplicatedMapRequestHandlerAdvice); + } + + @Test + public void testBulkWriteToReplicatedMap() throws InterruptedException { + Map userMap = + new HashMap<>(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + for (int index = 1; + index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { + userMap + .put(index, HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); + } + + this.bulkReplicatedMapChannel.send(new GenericMessage<>(userMap)); + + assertTrue(this.testBulkReplicatedMapRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + HazelcastOutboundChannelAdapterTestUtils + .verifyMapForPayload(new TreeMap(this.bulkReplicatedMap)); + } + + + @Test + public void testWriteToDistributedList() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedList(this.listChannel, this.distributedList, + this.testListRequestHandlerAdvice); + } + + @Test + public void testBulkWriteToDistributedList() throws InterruptedException { + List userList = + new ArrayList<>(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + for (int index = 1; + index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { + userList.add(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); + } + + this.bulkListChannel.send(new GenericMessage<>(userList)); + + assertTrue(this.testBulkListRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + HazelcastOutboundChannelAdapterTestUtils + .verifyCollection(this.distributedBulkList, + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } + + @Test + public void testWriteToDistributedSet() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedSet(this.setChannel, this.distributedSet, + this.testSetRequestHandlerAdvice); + } + + @Test + public void testBulkWriteToDistributedSet() throws InterruptedException { + Set userSet = + new HashSet<>(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + for (int index = 1; + index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { + userSet.add(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); + } + + this.bulkSetChannel.send(new GenericMessage<>(userSet)); + + assertTrue(this.testBulkSetRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + final List list = + new ArrayList(this.distributedBulkSet); + Collections.sort(list); + HazelcastOutboundChannelAdapterTestUtils + .verifyCollection(list, HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } + + @Test + public void testWriteToDistributedQueue() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedQueue(this.queueChannel, this.distributedQueue, + this.testQueueRequestHandlerAdvice); + } + + @Test + public void testBulkWriteToDistributedQueue() throws InterruptedException { + Queue userQueue = + new ArrayBlockingQueue(HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + for (int index = 1; + index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { + userQueue.add(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)); + } + + this.bulkQueueChannel.send(new GenericMessage<>(userQueue)); + + assertTrue(this.testBulkQueueRequestHandlerAdvice.executeLatch + .await(10, TimeUnit.SECONDS)); + HazelcastOutboundChannelAdapterTestUtils + .verifyCollection(this.distributedBulkQueue, + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } + + @Test + public void testWriteToTopic() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToTopic(this.topicChannel, this.topic, + this.testTopicRequestHandlerAdvice); + } + + @Test(expected = MessageHandlingException.class) + public void testWriteToDistributedMapWhenCacheIsNotSet() { + this.fifthMapChannel.send(new GenericMessage<>( + HazelcastOutboundChannelAdapterTestUtils.getTestUser(1))); + } + + @Test(expected = MessageHandlingException.class) + public void testWriteToDistributedMapWhenKeyExpressionIsNotSet() { + Message message = this.messageBuilderFactory + .withPayload(HazelcastOutboundChannelAdapterTestUtils.getTestUser(1)) + .setHeader(HazelcastHeaders.CACHE_NAME, DISTRIBUTED_MAP).build(); + this.sixthMapChannel.send(message); + } + + @Test(expected = MessageHandlingException.class) + public void testWriteToLock() { + this.lockChannel.send(new GenericMessage<>("foo")); + } + + private void sendMessageWithCacheHeaderToChannel(final MessageChannel channel, + final String headerName, final String distributedObjectName) { + for (int index = 1; + index <= HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT; index++) { + Message message = this.messageBuilderFactory + .withPayload(HazelcastOutboundChannelAdapterTestUtils.getTestUser(index)) + .setHeader(headerName, distributedObjectName).build(); + channel.send(message); + } + } + + private void verifyMapForMessage( + final Map> map) { + int index = 1; + assertNotNull(map); + assertEquals(true, map.size() == HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + for (Entry> entry : map.entrySet()) { + assertNotNull(entry); + assertEquals(index, entry.getKey().intValue()); + assertTrue(entry.getValue().getHeaders().size() > 0); + HazelcastOutboundChannelAdapterTestUtils + .verifyHazelcastIntegrationTestUser(entry.getValue().getPayload(), index); + index++; + } + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java index 6487998..1d43c8f 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,13 +34,13 @@ import org.springframework.integration.hazelcast.outbound.HazelcastCacheWritingM import org.springframework.integration.hazelcast.outbound.util.HazelcastOutboundChannelAdapterTestUtils; import org.springframework.messaging.MessageChannel; +import com.hazelcast.core.DistributedObject; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IMap; import com.hazelcast.core.ITopic; import com.hazelcast.core.MultiMap; import com.hazelcast.core.ReplicatedMap; -import com.hazelcast.core.DistributedObject; /** * Configuration Class for Hazelcast Integration Outbound Test @@ -49,252 +49,252 @@ import com.hazelcast.core.DistributedObject; * @since 1.0.0 */ @Configuration -@ComponentScan(basePackages = {"org.springframework.integration.hazelcast.*"}) +@ComponentScan(basePackages = { "org.springframework.integration.hazelcast.*" }) @EnableIntegration @IntegrationComponentScan("org.springframework.integration.hazelcast.outbound") public class HazelcastIntegrationOutboundTestConfiguration { - @Bean - public MessageChannel distMapChannel() { - return new DirectChannel(); - } + @Bean + public MessageChannel distMapChannel() { + return new DirectChannel(); + } - @Bean - public MessageChannel distMapBulkChannel() { - return new DirectChannel(); - } + @Bean + public MessageChannel distMapBulkChannel() { + return new DirectChannel(); + } - @Bean - public MessageChannel distListChannel() { - return new DirectChannel(); - } + @Bean + public MessageChannel distListChannel() { + return new DirectChannel(); + } - @Bean - public MessageChannel distSetChannel() { - return new DirectChannel(); - } + @Bean + public MessageChannel distSetChannel() { + return new DirectChannel(); + } - @Bean - public MessageChannel distQueueChannel() { - return new DirectChannel(); - } + @Bean + public MessageChannel distQueueChannel() { + return new DirectChannel(); + } - @Bean - public MessageChannel topicChannel2() { - return new DirectChannel(); - } + @Bean + public MessageChannel topicChannel2() { + return new DirectChannel(); + } - @Bean - public MessageChannel multiMapChannel2() { - return new DirectChannel(); - } + @Bean + public MessageChannel multiMapChannel2() { + return new DirectChannel(); + } - @Bean - public MessageChannel replicatedMapChannel2() { - return new DirectChannel(); - } + @Bean + public MessageChannel replicatedMapChannel2() { + return new DirectChannel(); + } - @Bean - public IMap distMap() { - return testHzInstance().getMap("Distributed_Map1"); - } + @Bean + public IMap distMap() { + return testHzInstance().getMap("Distributed_Map1"); + } - @Bean - public IMap distBulkMap() { - return testHzInstance().getMap("Distributed_Bulk_Map1"); - } + @Bean + public IMap distBulkMap() { + return testHzInstance().getMap("Distributed_Bulk_Map1"); + } - @Bean - public List distList() { - return testHzInstance().getList("Distributed_List1"); - } + @Bean + public List distList() { + return testHzInstance().getList("Distributed_List1"); + } - @Bean - public Set distSet() { - return testHzInstance().getSet("Distributed_Set1"); - } + @Bean + public Set distSet() { + return testHzInstance().getSet("Distributed_Set1"); + } - @Bean - public Queue distQueue() { - return testHzInstance().getQueue("Distributed_Queue1"); - } + @Bean + public Queue distQueue() { + return testHzInstance().getQueue("Distributed_Queue1"); + } - @Bean - public ITopic topic() { - return testHzInstance().getTopic("Topic1"); - } + @Bean + public ITopic topic() { + return testHzInstance().getTopic("Topic1"); + } - @Bean - public MultiMap multiMap() { - return testHzInstance().getMultiMap("Multi_Map1"); - } + @Bean + public MultiMap multiMap() { + return testHzInstance().getMultiMap("Multi_Map1"); + } - @Bean - public ReplicatedMap replicatedMap() { - return testHzInstance().getReplicatedMap("Replicated_Map1"); - } + @Bean + public ReplicatedMap replicatedMap() { + return testHzInstance().getReplicatedMap("Replicated_Map1"); + } - @Bean - public HazelcastInstance testHzInstance() { - return Hazelcast.newHazelcastInstance(); - } + @Bean + public HazelcastInstance testHzInstance() { + return Hazelcast.newHazelcastInstance(); + } - @Bean - public HazelcastTestRequestHandlerAdvice distMapRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice distMapRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - public HazelcastTestRequestHandlerAdvice distBulkMapRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice(1); - } + @Bean + public HazelcastTestRequestHandlerAdvice distBulkMapRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice(1); + } - @Bean - public HazelcastTestRequestHandlerAdvice distListRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice distListRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - public HazelcastTestRequestHandlerAdvice distSetRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice distSetRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - public HazelcastTestRequestHandlerAdvice distQueueRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice distQueueRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - public HazelcastTestRequestHandlerAdvice topicRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice topicRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - public HazelcastTestRequestHandlerAdvice multiMapRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice multiMapRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - public HazelcastTestRequestHandlerAdvice replicatedMapRequestHandlerAdvice() { - return new HazelcastTestRequestHandlerAdvice( - HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); - } + @Bean + public HazelcastTestRequestHandlerAdvice replicatedMapRequestHandlerAdvice() { + return new HazelcastTestRequestHandlerAdvice( + HazelcastOutboundChannelAdapterTestUtils.DATA_COUNT); + } - @Bean - @ServiceActivator(inputChannel = "distMapChannel", adviceChain = "distMapRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject(distMap()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "distMapChannel", adviceChain = "distMapRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject(distMap()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "distMapBulkChannel", - adviceChain = "distBulkMapRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler2() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject(distBulkMap()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "distMapBulkChannel", + adviceChain = "distBulkMapRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler2() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject(distBulkMap()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "distListChannel", - adviceChain = "distListRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler3() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject((DistributedObject) distList()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "distListChannel", + adviceChain = "distListRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler3() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject((DistributedObject) distList()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "distSetChannel", - adviceChain = "distSetRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler4() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject((DistributedObject) distSet()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "distSetChannel", + adviceChain = "distSetRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler4() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject((DistributedObject) distSet()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "distQueueChannel", - adviceChain = "distQueueRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler5() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject((DistributedObject) distQueue()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "distQueueChannel", + adviceChain = "distQueueRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler5() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject((DistributedObject) distQueue()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "topicChannel2", - adviceChain = "topicRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler6() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject(topic()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "topicChannel2", + adviceChain = "topicRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler6() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject(topic()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "multiMapChannel2", - adviceChain = "multiMapRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler7() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject(multiMap()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "multiMapChannel2", + adviceChain = "multiMapRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler7() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject(multiMap()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } - @Bean - @ServiceActivator(inputChannel = "replicatedMapChannel2", - adviceChain = "replicatedMapRequestHandlerAdvice") - public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler8() { - final HazelcastCacheWritingMessageHandler handler = - new HazelcastCacheWritingMessageHandler(); - handler.setDistributedObject(replicatedMap()); - handler - .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); - handler.setExtractPayload(true); + @Bean + @ServiceActivator(inputChannel = "replicatedMapChannel2", + adviceChain = "replicatedMapRequestHandlerAdvice") + public HazelcastCacheWritingMessageHandler hazelcastCacheWritingMessageHandler8() { + final HazelcastCacheWritingMessageHandler handler = + new HazelcastCacheWritingMessageHandler(); + handler.setDistributedObject(replicatedMap()); + handler + .setKeyExpression(new SpelExpressionParser().parseExpression("payload.id")); + handler.setExtractPayload(true); - return handler; - } + return handler; + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java index 53bf4a9..36d0c7a 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 the original author or authors. + * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,151 +49,151 @@ import com.hazelcast.core.ReplicatedMap; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = HazelcastIntegrationOutboundTestConfiguration.class, - loader = AnnotationConfigContextLoader.class) + loader = AnnotationConfigContextLoader.class) @DirtiesContext public class HazelcastOutboundChannelAdapterConfigTests { - @Autowired - @Qualifier("distMapChannel") - private MessageChannel distMapChannel; + @Autowired + @Qualifier("distMapChannel") + private MessageChannel distMapChannel; - @Autowired - @Qualifier("distMapBulkChannel") - private MessageChannel distMapBulkChannel; + @Autowired + @Qualifier("distMapBulkChannel") + private MessageChannel distMapBulkChannel; - @Autowired - @Qualifier("distListChannel") - private MessageChannel distListChannel; + @Autowired + @Qualifier("distListChannel") + private MessageChannel distListChannel; - @Autowired - @Qualifier("distSetChannel") - private MessageChannel distSetChannel; + @Autowired + @Qualifier("distSetChannel") + private MessageChannel distSetChannel; - @Autowired - @Qualifier("distQueueChannel") - private MessageChannel distQueueChannel; + @Autowired + @Qualifier("distQueueChannel") + private MessageChannel distQueueChannel; - @Autowired - @Qualifier("topicChannel2") - private MessageChannel topicChannel2; + @Autowired + @Qualifier("topicChannel2") + private MessageChannel topicChannel2; - @Autowired - @Qualifier("multiMapChannel2") - private MessageChannel multiMapChannel2; + @Autowired + @Qualifier("multiMapChannel2") + private MessageChannel multiMapChannel2; - @Autowired - @Qualifier("replicatedMapChannel2") - private MessageChannel replicatedMapChannel2; + @Autowired + @Qualifier("replicatedMapChannel2") + private MessageChannel replicatedMapChannel2; - @Resource - private IMap distMap; + @Resource + private IMap distMap; - @Resource - private IMap distBulkMap; + @Resource + private IMap distBulkMap; - @Resource - private List distList; + @Resource + private List distList; - @Resource - private Set distSet; + @Resource + private Set distSet; - @Resource - private Queue distQueue; + @Resource + private Queue distQueue; - @Resource - private ITopic topic; + @Resource + private ITopic topic; - @Resource - private MultiMap multiMap; + @Resource + private MultiMap multiMap; - @Resource - private ReplicatedMap replicatedMap; + @Resource + private ReplicatedMap replicatedMap; - @Autowired - @Qualifier("distMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice distMapRequestHandlerAdvice; + @Autowired + @Qualifier("distMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice distMapRequestHandlerAdvice; - @Autowired - @Qualifier("distBulkMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice distBulkMapRequestHandlerAdvice; + @Autowired + @Qualifier("distBulkMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice distBulkMapRequestHandlerAdvice; - @Autowired - @Qualifier("distListRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice distListRequestHandlerAdvice; + @Autowired + @Qualifier("distListRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice distListRequestHandlerAdvice; - @Autowired - @Qualifier("distSetRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice distSetRequestHandlerAdvice; + @Autowired + @Qualifier("distSetRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice distSetRequestHandlerAdvice; - @Autowired - @Qualifier("distQueueRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice distQueueRequestHandlerAdvice; + @Autowired + @Qualifier("distQueueRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice distQueueRequestHandlerAdvice; - @Autowired - @Qualifier("topicRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice topicRequestHandlerAdvice; + @Autowired + @Qualifier("topicRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice topicRequestHandlerAdvice; - @Autowired - @Qualifier("multiMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice multiMapRequestHandlerAdvice; + @Autowired + @Qualifier("multiMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice multiMapRequestHandlerAdvice; - @Autowired - @Qualifier("replicatedMapRequestHandlerAdvice") - private HazelcastTestRequestHandlerAdvice replicatedMapRequestHandlerAdvice; + @Autowired + @Qualifier("replicatedMapRequestHandlerAdvice") + private HazelcastTestRequestHandlerAdvice replicatedMapRequestHandlerAdvice; - @Test - public void testWriteToDistributedMap() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedMap(this.distMapChannel, this.distMap, - this.distMapRequestHandlerAdvice); - } + @Test + public void testWriteToDistributedMap() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedMap(this.distMapChannel, this.distMap, + this.distMapRequestHandlerAdvice); + } - @Test - public void testBulkWriteToDistributedMap() { - HazelcastOutboundChannelAdapterTestUtils - .testBulkWriteToDistributedMap(this.distMapBulkChannel, this.distBulkMap, - this.distBulkMapRequestHandlerAdvice); - } + @Test + public void testBulkWriteToDistributedMap() { + HazelcastOutboundChannelAdapterTestUtils + .testBulkWriteToDistributedMap(this.distMapBulkChannel, this.distBulkMap, + this.distBulkMapRequestHandlerAdvice); + } - @Test - public void testWriteToDistributedList() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedList(this.distListChannel, this.distList, - this.distListRequestHandlerAdvice); - } + @Test + public void testWriteToDistributedList() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedList(this.distListChannel, this.distList, + this.distListRequestHandlerAdvice); + } - @Test - public void testWriteToDistributedSet() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedSet(this.distSetChannel, this.distSet, - this.distSetRequestHandlerAdvice); - } + @Test + public void testWriteToDistributedSet() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedSet(this.distSetChannel, this.distSet, + this.distSetRequestHandlerAdvice); + } - @Test - public void testWriteToDistributedQueue() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToDistributedQueue(this.distQueueChannel, this.distQueue, - this.distQueueRequestHandlerAdvice); - } + @Test + public void testWriteToDistributedQueue() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToDistributedQueue(this.distQueueChannel, this.distQueue, + this.distQueueRequestHandlerAdvice); + } - @Test - public void testWriteToTopic() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToTopic(this.topicChannel2, this.topic, this.topicRequestHandlerAdvice); - } + @Test + public void testWriteToTopic() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToTopic(this.topicChannel2, this.topic, this.topicRequestHandlerAdvice); + } - @Test - public void testWriteToMultiMap() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToMultiMap(this.multiMapChannel2, this.multiMap, - this.multiMapRequestHandlerAdvice); - } + @Test + public void testWriteToMultiMap() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToMultiMap(this.multiMapChannel2, this.multiMap, + this.multiMapRequestHandlerAdvice); + } - @Test - public void testWriteToReplicatedMap() { - HazelcastOutboundChannelAdapterTestUtils - .testWriteToReplicatedMap(this.replicatedMapChannel2, this.replicatedMap, - this.replicatedMapRequestHandlerAdvice); - } + @Test + public void testWriteToReplicatedMap() { + HazelcastOutboundChannelAdapterTestUtils + .testWriteToReplicatedMap(this.replicatedMapChannel2, this.replicatedMap, + this.replicatedMapRequestHandlerAdvice); + } } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java index 8e28aae..09e9db6 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.ArrayList; -import java.util.Collections; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -51,8 +51,8 @@ import com.hazelcast.core.ReplicatedMap; * * @since 1.0.0 */ -@SuppressWarnings({"unchecked", "rawtypes"}) -public class HazelcastOutboundChannelAdapterTestUtils { +@SuppressWarnings({ "unchecked", "rawtypes" }) +public final class HazelcastOutboundChannelAdapterTestUtils { public static final int DATA_COUNT = 100; @@ -63,14 +63,14 @@ public class HazelcastOutboundChannelAdapterTestUtils { public static final String TEST_SURNAME = "Test_Surname"; public static void testWriteToDistributedMap(MessageChannel channel, - Map distributedMap, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + Map distributedMap, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { testWriteToMap(channel, distributedMap, requestHandlerAdvice); } private static void testWriteToMap(MessageChannel channel, - Map distributedMap, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + Map distributedMap, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { try { sendMessageToChannel(channel); assertTrue(requestHandlerAdvice.executeLatch.await(10, TimeUnit.SECONDS)); @@ -82,8 +82,8 @@ public class HazelcastOutboundChannelAdapterTestUtils { } public static void testBulkWriteToDistributedMap(MessageChannel channel, - Map distributedMap, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + Map distributedMap, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { try { Map userMap = new HashMap<>(DATA_COUNT); @@ -102,8 +102,8 @@ public class HazelcastOutboundChannelAdapterTestUtils { } public static void testWriteToMultiMap(MessageChannel channel, - MultiMap multiMap, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + MultiMap multiMap, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { try { sendMessageToChannel(channel); assertTrue(requestHandlerAdvice.executeLatch.await(10, TimeUnit.SECONDS)); @@ -115,20 +115,20 @@ public class HazelcastOutboundChannelAdapterTestUtils { } public static void testWriteToReplicatedMap(MessageChannel channel, - ReplicatedMap replicatedMap, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + ReplicatedMap replicatedMap, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { testWriteToMap(channel, replicatedMap, requestHandlerAdvice); } public static void testWriteToDistributedList(MessageChannel channel, - List distributedList, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + List distributedList, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { testWriteToDistributedCollection(channel, distributedList, requestHandlerAdvice); } private static void testWriteToDistributedCollection(MessageChannel channel, - Collection distributedList, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + Collection distributedList, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { try { sendMessageToChannel(channel); assertTrue(requestHandlerAdvice.executeLatch.await(10, TimeUnit.SECONDS)); @@ -140,8 +140,8 @@ public class HazelcastOutboundChannelAdapterTestUtils { } public static void testWriteToDistributedSet(MessageChannel channel, - Set distributedSet, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + Set distributedSet, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { try { sendMessageToChannel(channel); assertTrue(requestHandlerAdvice.executeLatch.await(10, TimeUnit.SECONDS)); @@ -155,14 +155,14 @@ public class HazelcastOutboundChannelAdapterTestUtils { } public static void testWriteToDistributedQueue(MessageChannel channel, - Queue distributedQueue, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + Queue distributedQueue, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { testWriteToDistributedCollection(channel, distributedQueue, requestHandlerAdvice); } public static void testWriteToTopic(MessageChannel channel, - ITopic topic, - HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { + ITopic topic, + HazelcastTestRequestHandlerAdvice requestHandlerAdvice) { try { topic.addMessageListener(new MessageListener() { @@ -244,4 +244,7 @@ public class HazelcastOutboundChannelAdapterTestUtils { } } + private HazelcastOutboundChannelAdapterTestUtils() { + } + }