cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [5/5] cayenne git commit: CAY-2030 Capturing a stream of commit changes
Date Thu, 22 Oct 2015 14:56:51 GMT
CAY-2030 Capturing a stream of commit changes

    * flattened relationship test


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/b746d067
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/b746d067
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/b746d067

Branch: refs/heads/master
Commit: b746d0671a7e33dcf20fef49152778be98fce1fa
Parents: cc1eea8
Author: aadamchik <aadamchik@apache.org>
Authored: Thu Oct 22 17:31:07 2015 +0300
Committer: aadamchik <aadamchik@apache.org>
Committed: Thu Oct 22 17:52:59 2015 +0300

----------------------------------------------------------------------
 .../lifecycle/audit/AuditableFilterIT.java      |   4 +-
 .../postcommit/PostCommitFilter_AllIT.java      |   5 +-
 .../PostCommitFilter_All_FlattenedIT.java       | 140 +++++++++++++++++++
 .../postcommit/PostCommitFilter_FilteredIT.java |   4 +-
 .../lifecycle/unit/AuditableServerCase.java     |  83 +++++++++++
 .../lifecycle/unit/FlattenedServerCase.java     |  62 ++++++++
 .../lifecycle/unit/LifecycleServerCase.java     |  83 -----------
 .../src/test/resources/lifecycle-map.map.xml    |   4 +-
 8 files changed, 293 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/audit/AuditableFilterIT.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/audit/AuditableFilterIT.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/audit/AuditableFilterIT.java
index 717bbca..7df6e27 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/audit/AuditableFilterIT.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/audit/AuditableFilterIT.java
@@ -40,10 +40,10 @@ import org.apache.cayenne.lifecycle.db.AuditableChild3;
 import org.apache.cayenne.lifecycle.db.AuditableChildUuid;
 import org.apache.cayenne.lifecycle.id.IdCoder;
 import org.apache.cayenne.lifecycle.relationship.ObjectIdRelationshipHandler;
-import org.apache.cayenne.lifecycle.unit.LifecycleServerCase;
+import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
 import org.junit.Test;
 
-public class AuditableFilterIT extends LifecycleServerCase {
+public class AuditableFilterIT extends AuditableServerCase {
 
 	@Test
 	public void testAudit_IgnoreRuntimeRelationships() throws Exception {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
index f2ba0ea..62e59a0 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
@@ -42,14 +42,14 @@ import org.apache.cayenne.lifecycle.changemap.ToManyRelationshipChange;
 import org.apache.cayenne.lifecycle.changemap.ToOneRelationshipChange;
 import org.apache.cayenne.lifecycle.db.Auditable1;
 import org.apache.cayenne.lifecycle.db.AuditableChild1;
-import org.apache.cayenne.lifecycle.unit.LifecycleServerCase;
+import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
 import org.apache.cayenne.query.SelectById;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
-public class PostCommitFilter_AllIT extends LifecycleServerCase {
+public class PostCommitFilter_AllIT extends AuditableServerCase {
 
 	protected ObjectContext context;
 	protected PostCommitListener mockListener;
@@ -294,5 +294,4 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 
 		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
new file mode 100644
index 0000000..c37991c
--- /dev/null
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
@@ -0,0 +1,140 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.lifecycle.postcommit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.sql.SQLException;
+
+import org.apache.cayenne.ObjectContext;
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
+import org.apache.cayenne.lifecycle.changemap.ChangeMap;
+import org.apache.cayenne.lifecycle.changemap.ObjectChange;
+import org.apache.cayenne.lifecycle.changemap.ObjectChangeType;
+import org.apache.cayenne.lifecycle.changemap.ToManyRelationshipChange;
+import org.apache.cayenne.lifecycle.db.E3;
+import org.apache.cayenne.lifecycle.db.E4;
+import org.apache.cayenne.lifecycle.unit.FlattenedServerCase;
+import org.apache.cayenne.query.SelectById;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+public class PostCommitFilter_All_FlattenedIT extends FlattenedServerCase {
+
+	protected ObjectContext context;
+	protected PostCommitListener mockListener;
+
+	@Override
+	protected ServerRuntimeBuilder configureCayenne() {
+		this.mockListener = mock(PostCommitListener.class);
+		return super.configureCayenne().addModule(PostCommitModuleBuilder.builder().listener(mockListener).build());
+	}
+
+	@Before
+	public void before() {
+		context = runtime.newContext();
+	}
+
+	@Test
+	public void testPostCommit_UpdateToMany() throws SQLException {
+		e3.insert(1);
+		e4.insert(11);
+		e4.insert(12);
+		e34.insert(1, 11);
+
+		final E3 e3 = SelectById.query(E3.class, 1).selectOne(context);
+		final E4 e4_1 = SelectById.query(E4.class, 11).selectOne(context);
+		final E4 e4_2 = SelectById.query(E4.class, 12).selectOne(context);
+
+		doAnswer(new Answer<Object>() {
+			@Override
+			public Object answer(InvocationOnMock invocation) throws Throwable {
+
+				assertSame(context, invocation.getArguments()[0]);
+
+				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
+				assertNotNull(changes);
+				assertEquals(3, changes.getUniqueChanges().size());
+
+				ObjectChange e3c = changes.getChanges().get(new ObjectId("E3", E3.ID_PK_COLUMN, 1));
+				assertNotNull(e3c);
+				assertEquals(ObjectChangeType.UPDATE, e3c.getType());
+				assertEquals(0, e3c.getAttributeChanges().size());
+				assertEquals(1, e3c.getToManyRelationshipChanges().size());
+
+				ToManyRelationshipChange e3c1 = e3c.getToManyRelationshipChanges().get(E3.E4S.getName());
+				assertNotNull(e3c1);
+
+				assertEquals(1, e3c1.getAdded().size());
+				assertTrue(e3c1.getAdded().contains(e4_2.getObjectId()));
+
+				assertEquals(1, e3c1.getRemoved().size());
+				assertTrue(e3c1.getRemoved().contains(e4_1.getObjectId()));
+				
+				ObjectChange e41c = changes.getChanges().get(new ObjectId("E4", E4.ID_PK_COLUMN, 11));
+				assertNotNull(e41c);
+				assertEquals(ObjectChangeType.UPDATE, e41c.getType());
+				assertEquals(0, e41c.getAttributeChanges().size());
+				assertEquals(1, e41c.getToManyRelationshipChanges().size());
+
+				ToManyRelationshipChange e41c1 = e41c.getToManyRelationshipChanges().get(E4.E3S.getName());
+				assertNotNull(e41c);
+
+				assertEquals(0, e41c1.getAdded().size());
+
+				assertEquals(1, e41c1.getRemoved().size());
+				assertTrue(e41c1.getRemoved().contains(e3.getObjectId()));
+				
+				ObjectChange e42c = changes.getChanges().get(new ObjectId("E4", E4.ID_PK_COLUMN, 12));
+				assertNotNull(e42c);
+				assertEquals(ObjectChangeType.UPDATE, e42c.getType());
+				assertEquals(0, e42c.getAttributeChanges().size());
+				assertEquals(1, e42c.getToManyRelationshipChanges().size());
+
+				ToManyRelationshipChange e42c1 = e42c.getToManyRelationshipChanges().get(E4.E3S.getName());
+				assertNotNull(e42c);
+
+				assertEquals(0, e42c1.getRemoved().size());
+
+				assertEquals(1, e42c1.getAdded().size());
+				assertTrue(e42c1.getAdded().contains(e3.getObjectId()));
+
+				return null;
+			}
+		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
+
+		e3.removeFromE4s(e4_1);
+		e3.addToE4s(e4_2);
+
+		context.commitChanges();
+
+		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
index 23f1519..5297d2e 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
@@ -36,14 +36,14 @@ import org.apache.cayenne.lifecycle.changemap.ObjectChange;
 import org.apache.cayenne.lifecycle.changemap.ObjectChangeType;
 import org.apache.cayenne.lifecycle.changemap.AttributeChange;
 import org.apache.cayenne.lifecycle.db.Auditable2;
-import org.apache.cayenne.lifecycle.unit.LifecycleServerCase;
+import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
 import org.apache.cayenne.query.SelectById;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
-public class PostCommitFilter_FilteredIT extends LifecycleServerCase {
+public class PostCommitFilter_FilteredIT extends AuditableServerCase {
 
 	protected ObjectContext context;
 	protected PostCommitListener mockListener;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
new file mode 100644
index 0000000..d47da11
--- /dev/null
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
@@ -0,0 +1,83 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.lifecycle.unit;
+
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.junit.After;
+import org.junit.Before;
+
+/**
+ * A superclass of integration tests for cayenne-lifecycle.
+ */
+public abstract class AuditableServerCase {
+
+	protected ServerRuntime runtime;
+
+	protected TableHelper auditable1;
+	protected TableHelper auditableChild1;
+	protected TableHelper auditableChild2;
+
+	protected TableHelper auditable2;
+	protected TableHelper auditableChild3;
+	protected TableHelper auditableChildUuid;
+
+	@Before
+	public void startCayenne() throws Exception {
+		this.runtime = configureCayenne().build();
+
+		DBHelper dbHelper = new DBHelper(runtime.getDataSource());
+
+		this.auditable1 = new TableHelper(dbHelper, "AUDITABLE1").setColumns("ID", "CHAR_PROPERTY1");
+
+		this.auditableChild1 = new TableHelper(dbHelper, "AUDITABLE_CHILD1").setColumns("ID", "AUDITABLE1_ID",
+				"CHAR_PROPERTY1");
+
+		this.auditableChild2 = new TableHelper(dbHelper, "AUDITABLE_CHILD2").setColumns("ID", "AUDITABLE1_ID",
+				"CHAR_PROPERTY1");
+
+		this.auditable2 = new TableHelper(dbHelper, "AUDITABLE2").setColumns("ID", "CHAR_PROPERTY1",
"CHAR_PROPERTY2");
+
+		this.auditableChild3 = new TableHelper(dbHelper, "AUDITABLE_CHILD3").setColumns("ID", "AUDITABLE2_ID",
+				"CHAR_PROPERTY1", "CHAR_PROPERTY2");
+
+		this.auditableChildUuid = new TableHelper(dbHelper, "AUDITABLE_CHILD_UUID").setColumns("ID",
"UUID",
+				"CHAR_PROPERTY1", "CHAR_PROPERTY2");
+
+		this.auditableChild1.deleteAll();
+		this.auditableChild2.deleteAll();
+		this.auditable1.deleteAll();
+		this.auditableChild3.deleteAll();
+		this.auditable2.deleteAll();
+		this.auditableChildUuid.deleteAll();
+	}
+
+	protected ServerRuntimeBuilder configureCayenne() {
+		return ServerRuntimeBuilder.builder().addConfig("cayenne-lifecycle.xml");
+	}
+
+	@After
+	public void shutdownCayenne() {
+		if (runtime != null) {
+			runtime.shutdown();
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
new file mode 100644
index 0000000..42eaaa5
--- /dev/null
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
@@ -0,0 +1,62 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.lifecycle.unit;
+
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.junit.After;
+import org.junit.Before;
+
+public class FlattenedServerCase {
+
+	protected ServerRuntime runtime;
+
+	protected TableHelper e3;
+	protected TableHelper e4;
+	protected TableHelper e34;
+
+	@Before
+	public void startCayenne() throws Exception {
+		this.runtime = configureCayenne().build();
+
+		DBHelper dbHelper = new DBHelper(runtime.getDataSource());
+
+		this.e3 = new TableHelper(dbHelper, "E3").setColumns("ID");
+		this.e4 = new TableHelper(dbHelper, "E4").setColumns("ID");
+		this.e34 = new TableHelper(dbHelper, "E34").setColumns("E3_ID", "E4_ID");
+
+		this.e34.deleteAll();
+		this.e3.deleteAll();
+
+	}
+
+	protected ServerRuntimeBuilder configureCayenne() {
+		return ServerRuntimeBuilder.builder().addConfig("cayenne-lifecycle.xml");
+	}
+
+	@After
+	public void shutdownCayenne() {
+		if (runtime != null) {
+			runtime.shutdown();
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/LifecycleServerCase.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/LifecycleServerCase.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/LifecycleServerCase.java
deleted file mode 100644
index 85db299..0000000
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/unit/LifecycleServerCase.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.unit;
-
-import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.test.jdbc.TableHelper;
-import org.junit.After;
-import org.junit.Before;
-
-/**
- * A superclass of integration tests for cayenne-lifecycle.
- */
-public abstract class LifecycleServerCase {
-
-	protected ServerRuntime runtime;
-
-	protected TableHelper auditable1;
-	protected TableHelper auditableChild1;
-	protected TableHelper auditableChild2;
-
-	protected TableHelper auditable2;
-	protected TableHelper auditableChild3;
-	protected TableHelper auditableChildUuid;
-
-	@Before
-	public void startCayenne() throws Exception {
-		this.runtime = configureCayenne().build();
-
-		DBHelper dbHelper = new DBHelper(runtime.getDataSource());
-
-		this.auditable1 = new TableHelper(dbHelper, "AUDITABLE1").setColumns("ID", "CHAR_PROPERTY1");
-
-		this.auditableChild1 = new TableHelper(dbHelper, "AUDITABLE_CHILD1").setColumns("ID", "AUDITABLE1_ID",
-				"CHAR_PROPERTY1");
-
-		this.auditableChild2 = new TableHelper(dbHelper, "AUDITABLE_CHILD2").setColumns("ID", "AUDITABLE1_ID",
-				"CHAR_PROPERTY1");
-
-		this.auditable2 = new TableHelper(dbHelper, "AUDITABLE2").setColumns("ID", "CHAR_PROPERTY1",
"CHAR_PROPERTY2");
-
-		this.auditableChild3 = new TableHelper(dbHelper, "AUDITABLE_CHILD3").setColumns("ID", "AUDITABLE2_ID",
-				"CHAR_PROPERTY1", "CHAR_PROPERTY2");
-
-		this.auditableChildUuid = new TableHelper(dbHelper, "AUDITABLE_CHILD_UUID").setColumns("ID",
"UUID",
-				"CHAR_PROPERTY1", "CHAR_PROPERTY2");
-
-		this.auditableChild1.deleteAll();
-		this.auditableChild2.deleteAll();
-		this.auditable1.deleteAll();
-		this.auditableChild3.deleteAll();
-		this.auditable2.deleteAll();
-		this.auditableChildUuid.deleteAll();
-	}
-
-	protected ServerRuntimeBuilder configureCayenne() {
-		return ServerRuntimeBuilder.builder().addConfig("cayenne-lifecycle.xml");
-	}
-
-	@After
-	public void shutdownCayenne() {
-		if (runtime != null) {
-			runtime.shutdown();
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b746d067/cayenne-lifecycle/src/test/resources/lifecycle-map.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/resources/lifecycle-map.map.xml b/cayenne-lifecycle/src/test/resources/lifecycle-map.map.xml
index 14ac628..f254cf7 100644
--- a/cayenne-lifecycle/src/test/resources/lifecycle-map.map.xml
+++ b/cayenne-lifecycle/src/test/resources/lifecycle-map.map.xml
@@ -45,8 +45,8 @@
 		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
 	</db-entity>
 	<db-entity name="E34">
-		<db-attribute name="E3_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="E4_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="E3_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="E4_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
 	</db-entity>
 	<db-entity name="E4">
 		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>


Mime
View raw message