This is an automated email from the ASF dual-hosted git repository. ntimofeev pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit 642c6b17c8d4e357e3cc62b1797c59cdf70029af Author: Nikita Timofeev <stari...@gmail.com> AuthorDate: Mon Sep 6 19:46:53 2021 +0300 CAY-2718 Use testcontainers for the integration tests --- RELEASE-NOTES.txt | 1 + .../unit/testcontainers/Db2ContainerProvider.java | 20 +++++++++++++++++++- .../testcontainers/MariaDbContainerProvider.java | 18 ++++++++++++++++++ .../unit/testcontainers/MysqlContainerProvider.java | 18 ++++++++++++++++++ .../unit/testcontainers/OracleContainerProvider.java | 18 ++++++++++++++++++ .../testcontainers/PostgresContainerProvider.java | 18 ++++++++++++++++++ .../testcontainers/SqlServerContainerProvider.java | 18 ++++++++++++++++++ .../unit/testcontainers/TestContainerProvider.java | 18 ++++++++++++++++++ 8 files changed, 128 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index e02dc4d..95dd696 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -14,6 +14,7 @@ Date: Changes/New Features: CAY-2399 Convert string values to Enum in qualifiers +CAY-2718 Use testcontainers for the integration tests Bug Fixes: diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/Db2ContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/Db2ContainerProvider.java index e286362..5026365 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/Db2ContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/Db2ContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import java.time.Duration; @@ -13,7 +31,7 @@ public class Db2ContainerProvider extends TestContainerProvider { @Override public JdbcDatabaseContainer<?> startContainer(String version) { JdbcDatabaseContainer<?> container = super.startContainer(version); - // need to wait to ensure Oracle DB has started + // need to wait to ensure that DB has started try { Thread.sleep(40000); } catch (InterruptedException ignored) { diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MariaDbContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MariaDbContainerProvider.java index 3630d87..d7231bd 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MariaDbContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MariaDbContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import org.apache.cayenne.dba.JdbcAdapter; diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MysqlContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MysqlContainerProvider.java index eef3535..d6d6297 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MysqlContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/MysqlContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import java.util.Calendar; diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/OracleContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/OracleContainerProvider.java index c7c66f6..6bdd2c4 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/OracleContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/OracleContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import java.time.Duration; diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/PostgresContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/PostgresContainerProvider.java index a6b11b9..82dd9c8 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/PostgresContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/PostgresContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import org.apache.cayenne.dba.JdbcAdapter; diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/SqlServerContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/SqlServerContainerProvider.java index 8123cd2..11ae0c5 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/SqlServerContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/SqlServerContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import org.apache.cayenne.dba.JdbcAdapter; diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/TestContainerProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/TestContainerProvider.java index 7991272..aef507d 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/TestContainerProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/testcontainers/TestContainerProvider.java @@ -1,3 +1,21 @@ +/***************************************************************** + * 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 + * + * https://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.unit.testcontainers; import org.apache.cayenne.dba.JdbcAdapter;