Downgrade to Derby-10.13.1.1

Looks like we have started to fail much often
since upgrade to the `Derby-10.14.1.0`:
cb0d43db6b

That is also related to this https://jira.spring.io/browse/INT-4445

* Remove all the `drop` mentioning for Derby scripts -
it just doesn't support `IF EXISTS`.
More over we don't need to worry about drops since each test now starts
its own fresh embedded DB

**Cherry-pick to 5.0.x**
This commit is contained in:
Artem Bilan
2018-04-19 14:10:52 -04:00
committed by Gary Russell
parent 7bcf6a040a
commit 82cbafaaa4
26 changed files with 36 additions and 73 deletions

View File

@@ -96,7 +96,7 @@ subprojects { subproject ->
commonsIoVersion = '2.4'
commonsNetVersion = '3.5'
curatorVersion = '2.11.1'
derbyVersion = '10.14.1.0'
derbyVersion = '10.13.1.1'
eclipseLinkVersion = '2.6.4'
ftpServerVersion = '1.1.1'
groovyVersion = '2.4.12'

View File

@@ -1,4 +1,3 @@
# Placeholders for Derby:
int.drop.script=classpath:/org/springframework/integration/jdbc/schema-drop-derby.sql
int.schema.script=classpath:/org/springframework/integration/jdbc/schema-derby.sql
int.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer

View File

@@ -20,9 +20,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY"/>
<jdbc:initialize-database data-source="dataSource"
ignore-failures="ALL">
<jdbc:script location="${int.drop.script}"/>
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}"/>
</jdbc:initialize-database>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 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.
@@ -24,11 +24,13 @@ import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.IntegrationMessageHeaderAccessor;
import org.springframework.integration.aggregator.AggregatingMessageHandler;
import org.springframework.integration.store.MessageGroupStore;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
@@ -44,6 +46,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
/**
* @author Artem Bilan
*
* @since 4.1
*/
@ContextConfiguration
@@ -57,6 +60,14 @@ public class AggregatorIntegrationTests {
@Autowired
private MessageGroupStore messageGroupStore;
@Autowired
private AggregatingMessageHandler aggregatingMessageHandler;
@After
public void tearDown() {
this.aggregatingMessageHandler.stop();
}
@Test
public void testTransactionalAggregatorGroupTimeout() throws InterruptedException {
this.transactionalAggregatorInput.send(new GenericMessage<Integer>(1, stubHeaders(1, 2, 1)));

View File

@@ -2,19 +2,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:mbean-server />
<context:mbean-export default-domain="org.springframework.integration.jdbc.test" />

View File

@@ -25,7 +25,7 @@
<jdbc:embedded-database type="H2" id="dataSource"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="org/springframework/integration/jdbc/config/outboundPollerSchema.sql" />
</jdbc:initialize-database>

View File

@@ -25,7 +25,7 @@
<jdbc:embedded-database id="dataSource" type="H2"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/config/outboundPollerSchema.sql"/>
</jdbc:initialize-database>

View File

@@ -31,7 +31,7 @@
<jdbc:embedded-database id="dataSource" type="H2"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/config/outboundPollerSchema.sql"/>
</jdbc:initialize-database>

View File

@@ -27,7 +27,7 @@
<jdbc:embedded-database id="dataSource" type="H2"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/config/outboundPollerSchemaWithData.sql"/>
</jdbc:initialize-database>

View File

@@ -11,7 +11,7 @@
<jdbc:embedded-database type="H2" id="dataSource"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/config/outboundSchema.sql"/>
</jdbc:initialize-database>

View File

@@ -1,5 +1,2 @@
drop table bazz;
drop table foow;
create table bazz(id varchar(100),status int,name varchar(20));
create table foow(id varchar(100),status int,name varchar(20));

View File

@@ -1,5 +1,3 @@
drop table bazz;
create table bazz(id varchar(100),status int,name varchar(20));
INSERT INTO bazz (id, status, name) VALUES (100, 3, 'Cartman')

View File

@@ -1,4 +1,2 @@
drop table foos;
drop table bars;
create table foos(id varchar(100), status int, name varchar(20));
create table bars(id int identity, status int, name varchar(20));

View File

@@ -4,15 +4,14 @@
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<jdbc:embedded-database id="dataSource" type="DERBY"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:script location="${int.drop.script}"/>
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}"/>
</jdbc:initialize-database>
@@ -32,7 +31,7 @@
<bean id="lockClient" class="org.springframework.integration.jdbc.lock.DefaultLockRepository">
<constructor-arg name="dataSource" ref="dataSource"/>
</bean>
<tx:annotation-driven/>
</beans>

View File

@@ -9,8 +9,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:script location="${int.drop.script}"/>
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}"/>
</jdbc:initialize-database>

View File

@@ -16,8 +16,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:script location="${int.drop.script}"/>
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}"/>
</jdbc:initialize-database>

View File

@@ -15,9 +15,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY" />
<jdbc:initialize-database data-source="dataSource"
ignore-failures="ALL">
<jdbc:script location="${int.drop.script}" />
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}" />
</jdbc:initialize-database>

View File

@@ -14,8 +14,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY" />
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:script location="${int.drop.script}" />
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}" />
</jdbc:initialize-database>

View File

@@ -9,8 +9,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY"/>
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:script location="${int.drop.script}"/>
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${int.schema.script}"/>
</jdbc:initialize-database>

View File

@@ -16,7 +16,7 @@
/> <property name="username" value="int" /> <property name="password" value="int"
/> </bean> -->
<jdbc:initialize-database data-source="dataSource" ignore-failures="ALL">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/schema-derby.sql" />
</jdbc:initialize-database>

View File

@@ -16,7 +16,7 @@
<property name="password" value="" />
</bean>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/schema-drop-h2.sql" />
<jdbc:script location="classpath:org/springframework/integration/jdbc/schema-h2.sql" />
</jdbc:initialize-database>

View File

@@ -16,7 +16,7 @@
<property name="password" value="" />
</bean>
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:org/springframework/integration/jdbc/schema-drop-hsqldb.sql"/>
<jdbc:script location="classpath:org/springframework/integration/jdbc/schema-hsqldb.sql"/>
</jdbc:initialize-database>

View File

@@ -1,17 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/task/spring-jdbc.xsd
http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:org/springframework/integration/jdbc/store/channel/DataSource-derby-context.xml"/>
<import resource="classpath:org/springframework/integration/jdbc/store/channel/TxTimeoutMessageStoreTests-context.xml"/>

View File

@@ -1,7 +0,0 @@
# Use Log4j
priority=1
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
# Configuration file of the log
#log4j.configuration=file:log4j-rabbit-stocks.properties

View File

@@ -1,6 +0,0 @@
DROP FUNCTION CONVERT_STRING_TO_UPPER_CASE;
DROP TABLE USERS;
DROP PROCEDURE CREATE_USER;
DROP PROCEDURE CREATE_USER_RETURN_ALL;
DROP TABLE JSON_MESSAGE;
DROP PROCEDURE GET_MESSAGE;

View File

@@ -7,8 +7,7 @@
<jdbc:embedded-database id="dataSource" type="DERBY" />
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS" >
<jdbc:script location="classpath:derby-stored-procedures-drops.sql"/>
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:derby-stored-procedures.sql"/>
</jdbc:initialize-database>