From 178c86faa4e5e43d963c45ab5ab754195da6826c Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 22 Jul 2015 17:34:18 -0400 Subject: [PATCH] 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 --- .../config/xml/DelayerUsageTests-context.xml | 4 ++-- .../core/AsyncMessagingTemplateTests.java | 4 ++-- .../ProducerAndConsumerAutoStartupTests.java | 18 +++++++++------- .../handler/DelayHandlerTests.java | 10 ++++++++- .../config/HttpInboundGatewayParserTests.java | 21 +++++++++++-------- spring-integration-jdbc/build.gradle | 6 ++---- .../integration/jdbc/schema-db2.sql | 4 ++-- .../integration/jdbc/schema-derby.sql | 4 ++-- .../integration/jdbc/schema-h2.sql | 4 ++-- .../integration/jdbc/schema-hsqldb.sql | 4 ++-- .../integration/jdbc/schema-mysql-5_6_4.sql | 4 ++-- .../integration/jdbc/schema-mysql.sql | 4 ++-- .../integration/jdbc/schema-oracle10g.sql | 4 ++-- .../integration/jdbc/schema-postgresql.sql | 4 ++-- .../integration/jdbc/schema-sqlserver.sql | 4 ++-- .../integration/jdbc/schema-sybase.sql | 4 ++-- .../src/main/sql/schema.sql.vpp | 4 ++-- .../ClientWebSocketContainerTests.java | 13 ++++++++++-- 18 files changed, 71 insertions(+), 49 deletions(-) diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/DelayerUsageTests-context.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/DelayerUsageTests-context.xml index 9136b78979..952b965762 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/DelayerUsageTests-context.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/DelayerUsageTests-context.xml @@ -61,9 +61,9 @@ - + - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/core/AsyncMessagingTemplateTests.java b/spring-integration-core/src/test/java/org/springframework/integration/core/AsyncMessagingTemplateTests.java index 1ca7427f59..4148885b79 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/core/AsyncMessagingTemplateTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/core/AsyncMessagingTemplateTests.java @@ -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> result = template.asyncSendAndReceive(MessageBuilder.withPayload("test").build()); try { - result.get(10, TimeUnit.MILLISECONDS); + result.get(10, TimeUnit.SECONDS); fail(); } catch (ExecutionException e) { diff --git a/spring-integration-core/src/test/java/org/springframework/integration/endpoint/ProducerAndConsumerAutoStartupTests.java b/spring-integration-core/src/test/java/org/springframework/integration/endpoint/ProducerAndConsumerAutoStartupTests.java index b2cf1b426d..9fd71e3ce5 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/endpoint/ProducerAndConsumerAutoStartupTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/endpoint/ProducerAndConsumerAutoStartupTests.java @@ -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 received = new ArrayList(); 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 numbers = new LinkedBlockingQueue(); 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); } + } } diff --git a/spring-integration-core/src/test/java/org/springframework/integration/handler/DelayHandlerTests.java b/spring-integration-core/src/test/java/org/springframework/integration/handler/DelayHandlerTests.java index bba38271b4..ffe91a10d3 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/handler/DelayHandlerTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/handler/DelayHandlerTests.java @@ -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() { + @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(); diff --git a/spring-integration-http/src/test/java/org/springframework/integration/http/config/HttpInboundGatewayParserTests.java b/spring-integration-http/src/test/java/org/springframework/integration/http/config/HttpInboundGatewayParserTests.java index 7bbc904e07..7d22f0ba00 100644 --- a/spring-integration-http/src/test/java/org/springframework/integration/http/config/HttpInboundGatewayParserTests.java +++ b/spring-integration-http/src/test/java/org/springframework/integration/http/config/HttpInboundGatewayParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 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. @@ -22,6 +22,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.springframework.integration.test.util.TestUtils.getPropertyValue; @@ -114,14 +115,14 @@ public class HttpInboundGatewayParserTests { @Test public void checkConfig() { assertNotNull(gateway); - assertThat((Boolean) getPropertyValue(gateway, "expectReply"), is(true)); - assertThat((Boolean) getPropertyValue(gateway, "convertExceptions"), is(true)); - assertThat((PollableChannel) getPropertyValue(gateway, "replyChannel"), is(responses)); + assertTrue(getPropertyValue(gateway, "expectReply", Boolean.class)); + assertTrue(getPropertyValue(gateway, "convertExceptions", Boolean.class)); + assertSame(this.responses, getPropertyValue(gateway, "replyChannel")); assertNotNull(TestUtils.getPropertyValue(gateway, "errorChannel")); MessagingTemplate messagingTemplate = TestUtils.getPropertyValue( gateway, "messagingTemplate", MessagingTemplate.class); - assertEquals(Long.valueOf(1234), TestUtils.getPropertyValue(messagingTemplate, "sendTimeout")); - assertEquals(Long.valueOf(4567), TestUtils.getPropertyValue(messagingTemplate, "receiveTimeout")); + assertEquals(1234L, TestUtils.getPropertyValue(messagingTemplate, "sendTimeout")); + assertEquals(4567L, TestUtils.getPropertyValue(messagingTemplate, "receiveTimeout")); boolean registerDefaultConverters = TestUtils.getPropertyValue(gateway,"mergeWithDefaultConverters", Boolean.class); assertFalse("By default the register-default-converters flag should be false", registerDefaultConverters); @@ -132,7 +133,7 @@ public class HttpInboundGatewayParserTests { messageConverters.size() > 0); } - @Test(timeout=1000) @DirtiesContext + @Test @DirtiesContext public void checkFlow() throws Exception { requests.subscribe(handlerExpecting(any(Message.class))); MockHttpServletRequest request = new MockHttpServletRequest(); @@ -258,7 +259,8 @@ public class HttpInboundGatewayParserTests { messageConverters.size() > 1); } - public static class Person{ + public static class Person { + private String name; public String getName() { @@ -268,9 +270,10 @@ public class HttpInboundGatewayParserTests { public void setName(String name) { this.name = name; } + } - public static class PersonConverter implements Converter{ + public static class PersonConverter implements Converter { public String convert(Person source) { return source.getName(); diff --git a/spring-integration-jdbc/build.gradle b/spring-integration-jdbc/build.gradle index e0d6a7227b..7c15f85d3d 100644 --- a/spring-integration-jdbc/build.gradle +++ b/spring-integration-jdbc/build.gradle @@ -14,6 +14,8 @@ task generateSql { configurations { vpp } dependencies { vpp 'foundrylogic.vpp:vpp:2.2.1' } + inputs.dir new File('src/main/sql') + def generatedResourcesDir = new File('src/main/resources/org/springframework/integration/jdbc') outputs.dir generatedResourcesDir @@ -45,7 +47,3 @@ task generateSql { // tie schema generation to the build lifecycle compileJava.dependsOn generateSql - -task cleanSql (type: Delete) { - delete fileTree(dir: 'src/main/resources/org/springframework/integration/jdbc').include('*.sql').exclude('config', 'store/channel') -} diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-db2.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-db2.sql index 296c6e024d..2aa333d6a3 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-db2.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-db2.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE TIMESTAMP NOT NULL, UPDATED_DATE TIMESTAMP DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-derby.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-derby.sql index 296c6e024d..2aa333d6a3 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-derby.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-derby.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE TIMESTAMP NOT NULL, UPDATED_DATE TIMESTAMP DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-h2.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-h2.sql index 5b89899124..ec471f1f8c 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-h2.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-h2.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE TIMESTAMP NOT NULL, UPDATED_DATE TIMESTAMP DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-hsqldb.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-hsqldb.sql index 5b89899124..ec471f1f8c 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-hsqldb.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-hsqldb.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE TIMESTAMP NOT NULL, UPDATED_DATE TIMESTAMP DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql-5_6_4.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql-5_6_4.sql index e3e0b79c44..c11b398679 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql-5_6_4.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql-5_6_4.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ) ENGINE=InnoDB; CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE DATETIME(6) NOT NULL, UPDATED_DATE DATETIME(6) DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql.sql index e34e6ad7a6..1546c7e623 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-mysql.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ) ENGINE=InnoDB; CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE DATETIME NOT NULL, UPDATED_DATE DATETIME DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-oracle10g.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-oracle10g.sql index 63695609f3..163c149499 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-oracle10g.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-oracle10g.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR2(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE TIMESTAMP NOT NULL, UPDATED_DATE TIMESTAMP DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-postgresql.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-postgresql.sql index 1d730347c9..2ae20d27d5 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-postgresql.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-postgresql.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE TIMESTAMP NOT NULL, UPDATED_DATE TIMESTAMP DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sqlserver.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sqlserver.sql index 68484be711..9dc762c882 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sqlserver.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sqlserver.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ); CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE DATETIME NOT NULL, UPDATED_DATE DATETIME DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -); \ No newline at end of file +); diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sybase.sql b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sybase.sql index 04e464d834..a57d16196d 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sybase.sql +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/schema-sybase.sql @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION VARCHAR(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) ) LOCK DATAROWS; CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE DATETIME NOT NULL, UPDATED_DATE DATETIME DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -) LOCK DATAROWS; \ No newline at end of file +) LOCK DATAROWS; diff --git a/spring-integration-jdbc/src/main/sql/schema.sql.vpp b/spring-integration-jdbc/src/main/sql/schema.sql.vpp index 1bca4d5873..6ac97074b2 100644 --- a/spring-integration-jdbc/src/main/sql/schema.sql.vpp +++ b/spring-integration-jdbc/src/main/sql/schema.sql.vpp @@ -14,7 +14,7 @@ CREATE TABLE INT_GROUP_TO_MESSAGE ( GROUP_KEY CHAR(36), MESSAGE_ID CHAR(36), REGION ${VARCHAR}(100), - constraint GROUP_TO_MESSAG_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) + constraint GROUP_TO_MESSAGE_PK primary key (GROUP_KEY, MESSAGE_ID, REGION) )#if(${VOODOO}) ${VOODOO}#end; CREATE TABLE INT_MESSAGE_GROUP ( @@ -26,4 +26,4 @@ CREATE TABLE INT_MESSAGE_GROUP ( CREATED_DATE ${TIMESTAMP} NOT NULL, UPDATED_DATE ${TIMESTAMP} DEFAULT NULL, constraint MESSAGE_GROUP_PK primary key (GROUP_KEY, REGION) -)#if(${VOODOO}) ${VOODOO}#end; \ No newline at end of file +)#if(${VOODOO}) ${VOODOO}#end; diff --git a/spring-integration-websocket/src/test/java/org/springframework/integration/websocket/ClientWebSocketContainerTests.java b/spring-integration-websocket/src/test/java/org/springframework/integration/websocket/ClientWebSocketContainerTests.java index c468dcc119..449311402e 100644 --- a/spring-integration-websocket/src/test/java/org/springframework/integration/websocket/ClientWebSocketContainerTests.java +++ b/spring-integration-websocket/src/test/java/org/springframework/integration/websocket/ClientWebSocketContainerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-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. @@ -26,10 +26,13 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.apache.tomcat.websocket.WsWebSocketContainer; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -61,8 +64,14 @@ public class ClientWebSocketContainerTests { @Test public void testClientWebSocketContainer() throws Exception { + StandardWebSocketClient webSocketClient = new StandardWebSocketClient(); + Map userProperties = new HashMap(); + userProperties.put(WsWebSocketContainer.IO_TIMEOUT_MS_PROPERTY, + "" + (WsWebSocketContainer.IO_TIMEOUT_MS_DEFAULT * 6)); + webSocketClient.setUserProperties(userProperties); + ClientWebSocketContainer container = - new ClientWebSocketContainer(new StandardWebSocketClient(), server.getWsBaseUrl() + "/ws/websocket"); + new ClientWebSocketContainer(webSocketClient, server.getWsBaseUrl() + "/ws/websocket"); TestWebSocketListener messageListener = new TestWebSocketListener(); container.setMessageListener(messageListener);