INT-4162: TCP/UDP DSL
JIRA: https://jira.spring.io/browse/INT-4162 INT-4162: IP DSL - Phase I Connection Factories Phase 2 - Adapters/Gateways Phase 3 - UDP Polishing - PR Comments Remove unnecessary generics. More Polishing - PR Comments Checkstyle/Javadoc Fixes ComponentsRegistration Improvements Add ...Spec CTORs to avoid the issue described here: https://github.com/spring-projects/spring-integration-java-dsl/issues/137 Also other PR comments. Fix UDP Spec Inheritance Jdbc Lock Test Log Adjuster Fix Mongo Test Race Conditions * Fox typos in the `AbstractUdpOutboundChannelAdapterSpec` * Improve `IpIntegrationTests.testUdpInheritance()` * Change `fixed-rate` to `fixed-delay` in the `MongoDbInboundChannelAdapterIntegrationTests-context` to pursue single-threaded environment from poller for test
This commit is contained in:
committed by
Artem Bilan
parent
46348291ff
commit
65ec234697
@@ -18,7 +18,7 @@
|
||||
query="{'name' : 'Bob'}"
|
||||
entity-class="java.lang.Object"
|
||||
auto-startup="false">
|
||||
<int:poller fixed-rate="100" />
|
||||
<int:poller fixed-delay="100" />
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<int-mongodb:inbound-channel-adapter id="mongoInboundAdapterNamedFactory"
|
||||
@@ -26,7 +26,7 @@
|
||||
channel="replyChannel"
|
||||
query="{'name' : 'Bob'}"
|
||||
auto-startup="false">
|
||||
<int:poller fixed-rate="5000" />
|
||||
<int:poller fixed-delay="5000" />
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<int-mongodb:inbound-channel-adapter id="mongoInboundAdapterWithTemplate"
|
||||
@@ -36,7 +36,7 @@
|
||||
expect-single-result="true"
|
||||
entity-class="org.springframework.integration.mongodb.rules.MongoDbAvailableTests.Person"
|
||||
auto-startup="false">
|
||||
<int:poller fixed-rate="5000" />
|
||||
<int:poller fixed-delay="5000" />
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<int-mongodb:inbound-channel-adapter id="mongoInboundAdapterWithNamedCollection"
|
||||
@@ -46,7 +46,7 @@
|
||||
query="{'name' : 'Bob'}"
|
||||
entity-class="java.lang.Object"
|
||||
auto-startup="false">
|
||||
<int:poller fixed-rate="5000" />
|
||||
<int:poller fixed-delay="5000" />
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<int-mongodb:inbound-channel-adapter id="mongoInboundAdapterWithNamedCollectionExpression"
|
||||
@@ -56,7 +56,7 @@
|
||||
query="{'name' : 'Bob'}"
|
||||
entity-class="java.lang.Object"
|
||||
auto-startup="false">
|
||||
<int:poller fixed-rate="5000" />
|
||||
<int:poller fixed-delay="5000" />
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<int-mongodb:inbound-channel-adapter id="inboundAdapterWithOnSuccessDisposition"
|
||||
@@ -64,7 +64,7 @@
|
||||
query="{'name' : 'Bob'}"
|
||||
auto-startup="false">
|
||||
|
||||
<int:poller fixed-rate="200" max-messages-per-poll="1">
|
||||
<int:poller fixed-delay="200" max-messages-per-poll="1">
|
||||
<int:advice-chain synchronization-factory="syncFactory">
|
||||
<bean
|
||||
class="org.springframework.integration.mongodb.config.MongoDbInboundChannelAdapterIntegrationTests.TestMessageSourceAdvice" />
|
||||
@@ -87,7 +87,7 @@
|
||||
entity-class="java.lang.Object"
|
||||
mongo-converter="mongoConverter"
|
||||
auto-startup="false">
|
||||
<int:poller fixed-rate="100" />
|
||||
<int:poller fixed-delay="100" />
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<bean id="documentCleaner"
|
||||
|
||||
@@ -35,12 +35,12 @@ import org.springframework.data.mongodb.core.query.BasicQuery;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.integration.aop.AbstractMessageSourceAdvice;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailable;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.PollableChannel;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -62,7 +62,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Autowired
|
||||
private PollableChannel replyChannel;
|
||||
private QueueChannel replyChannel;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("mongoInboundAdapter")
|
||||
@@ -106,6 +106,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
assertNotNull(this.replyChannel.receive(10000));
|
||||
|
||||
this.mongoInboundAdapter.stop();
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -121,6 +122,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
assertEquals("Bob", message.getPayload().get(0).get("name"));
|
||||
|
||||
this.mongoInboundAdapterNamedFactory.stop();
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -136,6 +138,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
assertEquals("Bob", message.getPayload().getName());
|
||||
|
||||
this.mongoInboundAdapterWithTemplate.stop();
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -151,6 +154,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
assertEquals("Bob", message.getPayload().get(0).getName());
|
||||
|
||||
this.mongoInboundAdapterWithNamedCollection.stop();
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -166,6 +170,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
assertEquals("Bob", message.getPayload().get(0).getName());
|
||||
|
||||
this.mongoInboundAdapterWithNamedCollectionExpression.stop();
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -181,6 +186,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
this.inboundAdapterWithOnSuccessDisposition.stop();
|
||||
|
||||
assertNull(this.mongoTemplate.findOne(new Query(Criteria.where("name").is("Bob")), Person.class, "data"));
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -197,6 +203,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
assertNotNull(replyChannel.receive(10000));
|
||||
|
||||
this.mongoInboundAdapterWithConverter.stop();
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@Test(expected = BeanDefinitionParsingException.class)
|
||||
|
||||
Reference in New Issue
Block a user