INT-3683: Fix typo in schema.sql.vpp
JIRA: https://jira.spring.io/browse/INT-3683 * In addition fix `inputs` for the Gradle `generateSql` task and regenerate all SQLs to apply the typo fix. The previous way to generate sql scripts doesn't work properly. It is always as `UP-TO-DATE`. Adding `inputs` to the `generateSql` show the correct behaviour. From other side that makes `cleanSql` task as redundant. * Applying the Travis config fix to this commit as well. Fix HTTP test timeout https://build.spring.io/browse/INT-B41-346 Fix `ProducerAndConsumerAutoStartupTests` https://build.spring.io/browse/INT-B41-346 Fix `DelayerUsageTests` `time` bean scope bug https://build.spring.io/browse/INT-B41-347 Fix `HttpInboundGatewayParserTests.java` generics Java < 8 compiler warnings Increase Tomcat response timeout for WebSocket tests https://build.spring.io/browse/INT-B41-349 Increase timeout in the `AsyncMessagingTemplateTests#executionException()` Fix `ClassCastException` for the `StandardWebSocketClient#userProperties` Increase Delay to 2 Seconds in DelayHandlerTests
This commit is contained in:
committed by
Gary Russell
parent
b69c0c2d24
commit
178c86faa4
@@ -61,9 +61,9 @@
|
||||
<queue/>
|
||||
</channel>
|
||||
|
||||
<beans:bean id="time" class="java.util.Calendar" factory-method="getInstance"/>
|
||||
<beans:bean id="time" class="java.util.Calendar" factory-method="getInstance" scope="prototype"/>
|
||||
|
||||
<delayer id="delayerExpression" input-channel="inputC" output-channel="outputC" expression="new java.util.Date(@time.timeInMillis + 5000)"/>
|
||||
<delayer id="delayerExpression" input-channel="inputC" output-channel="outputC" expression="new java.util.Date(@time.timeInMillis + 1000)"/>
|
||||
|
||||
|
||||
</beans:beans>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -406,7 +406,7 @@ public class AsyncMessagingTemplateTests {
|
||||
template.setDefaultDestination(channel);
|
||||
Future<Message<?>> result = template.asyncSendAndReceive(MessageBuilder.withPayload("test").build());
|
||||
try {
|
||||
result.get(10, TimeUnit.MILLISECONDS);
|
||||
result.get(10, TimeUnit.SECONDS);
|
||||
fail();
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -18,6 +18,7 @@ package org.springframework.integration.endpoint;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.support.AbstractApplicationContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
@@ -35,6 +36,7 @@ import static org.junit.Assert.assertEquals;
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
* @author Iwein Fuld
|
||||
* @author Artem Bilan
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@@ -52,9 +54,9 @@ public class ProducerAndConsumerAutoStartupTests {
|
||||
public void test() throws Exception {
|
||||
List<Integer> received = new ArrayList<Integer>();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
received.add(consumer.poll(500));
|
||||
received.add(this.consumer.poll(10000));
|
||||
}
|
||||
context.stop();
|
||||
this.context.stop();
|
||||
assertEquals(new Integer(1), received.get(0));
|
||||
assertEquals(new Integer(2), received.get(1));
|
||||
assertEquals(new Integer(3), received.get(2));
|
||||
@@ -66,12 +68,13 @@ public class ProducerAndConsumerAutoStartupTests {
|
||||
private final AtomicInteger count = new AtomicInteger();
|
||||
|
||||
public Integer next() throws InterruptedException {
|
||||
if (count.get()>2){
|
||||
if (this.count.get() > 2) {
|
||||
//prevent message overload
|
||||
return null;
|
||||
}
|
||||
return new Integer(count.incrementAndGet());
|
||||
return this.count.incrementAndGet();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,12 +83,13 @@ public class ProducerAndConsumerAutoStartupTests {
|
||||
private final BlockingQueue<Integer> numbers = new LinkedBlockingQueue<Integer>();
|
||||
|
||||
public void receive(Integer number) {
|
||||
numbers.add(number);
|
||||
this.numbers.add(number);
|
||||
}
|
||||
|
||||
Integer poll(long timeoutInMillis) throws InterruptedException {
|
||||
return numbers.poll(timeoutInMillis, TimeUnit.MILLISECONDS);
|
||||
return this.numbers.poll(timeoutInMillis, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -243,6 +243,7 @@ public class DelayHandlerTests {
|
||||
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10000, TimeUnit.MILLISECONDS);
|
||||
@@ -267,6 +268,7 @@ public class DelayHandlerTests {
|
||||
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10000, TimeUnit.MILLISECONDS);
|
||||
@@ -286,6 +288,7 @@ public class DelayHandlerTests {
|
||||
this.startDelayerHandler();
|
||||
output.unsubscribe(resultHandler);
|
||||
output.subscribe(new MessageHandler() {
|
||||
@Override
|
||||
public void handleMessage(Message<?> message) {
|
||||
throw new UnsupportedOperationException("intentional test failure");
|
||||
}
|
||||
@@ -305,6 +308,7 @@ public class DelayHandlerTests {
|
||||
output.unsubscribe(resultHandler);
|
||||
errorChannel.subscribe(resultHandler);
|
||||
output.subscribe(new MessageHandler() {
|
||||
@Override
|
||||
public void handleMessage(Message<?> message) {
|
||||
throw new UnsupportedOperationException("intentional test failure");
|
||||
}
|
||||
@@ -338,6 +342,7 @@ public class DelayHandlerTests {
|
||||
output.unsubscribe(resultHandler);
|
||||
customErrorChannel.subscribe(resultHandler);
|
||||
output.subscribe(new MessageHandler() {
|
||||
@Override
|
||||
public void handleMessage(Message<?> message) {
|
||||
throw new UnsupportedOperationException("intentional test failure");
|
||||
}
|
||||
@@ -369,6 +374,7 @@ public class DelayHandlerTests {
|
||||
output.unsubscribe(resultHandler);
|
||||
defaultErrorChannel.subscribe(resultHandler);
|
||||
output.subscribe(new MessageHandler() {
|
||||
@Override
|
||||
public void handleMessage(Message<?> message) {
|
||||
throw new UnsupportedOperationException("intentional test failure");
|
||||
}
|
||||
@@ -388,7 +394,7 @@ public class DelayHandlerTests {
|
||||
@Test //INT-1132
|
||||
public void testReschedulePersistedMessagesOnStartup() throws Exception {
|
||||
MessageGroupStore messageGroupStore = new SimpleMessageStore();
|
||||
this.delayHandler.setDefaultDelay(200);
|
||||
this.delayHandler.setDefaultDelay(2000);
|
||||
this.delayHandler.setMessageStore(messageGroupStore);
|
||||
this.startDelayerHandler();
|
||||
Message<?> message = MessageBuilder.withPayload("test").build();
|
||||
@@ -430,6 +436,7 @@ public class DelayHandlerTests {
|
||||
public void testDoubleOnApplicationEvent() throws Exception {
|
||||
this.delayHandler = Mockito.spy(this.delayHandler);
|
||||
Mockito.doAnswer(new Answer<Object>() {
|
||||
@Override
|
||||
public Object answer(InvocationOnMock invocation) throws Throwable {
|
||||
return null;
|
||||
}
|
||||
@@ -518,6 +525,7 @@ public class DelayHandlerTests {
|
||||
|
||||
private volatile Thread lastThread;
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message<?> message) {
|
||||
this.lastMessage = message;
|
||||
this.lastThread = Thread.currentThread();
|
||||
|
||||
Reference in New Issue
Block a user