From b47c220047a8b7b242e8f95412cd444d48827ba6 Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:18:00 +0000 Subject: [PATCH 01/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.11 [skip docker_latest] until alfresco-enterprise-share triggers the build or it is built manually --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 34d49fd62f..58b1a3f123 100644 --- a/pom.xml +++ b/pom.xml @@ -10,11 +10,11 @@ org.alfresco alfresco-enterprise-repo ../alfresco-enterprise-repo/pom.xml - 25.1.0.10 + 25.1.0.11 - 25.1.0.10 + 25.1.0.11 25.1.0.10 3.0.2 From b82953df2f1f1d9cec27ede4f49dc9ba805998d8 Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:48:46 +0000 Subject: [PATCH 02/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.11 - alfresco-enterprise-share: 25.1.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 58b1a3f123..2fa0df2c19 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ 25.1.0.11 - 25.1.0.10 + 25.1.0.11 3.0.2 From b53f3d126ebeb0e76a07da362d903d724eb635b4 Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:43:16 +0000 Subject: [PATCH 03/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.12 [skip docker_latest] until alfresco-enterprise-share triggers the build or it is built manually --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2fa0df2c19..15cdc57fff 100644 --- a/pom.xml +++ b/pom.xml @@ -10,11 +10,11 @@ org.alfresco alfresco-enterprise-repo ../alfresco-enterprise-repo/pom.xml - 25.1.0.11 + 25.1.0.12 - 25.1.0.11 + 25.1.0.12 25.1.0.11 3.0.2 From cf4b46a8f9d99ed0c0bed3b5371ab193b369044b Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:05:24 +0000 Subject: [PATCH 04/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.12 - alfresco-enterprise-share: 25.1.0.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 15cdc57fff..0da363e34c 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ 25.1.0.12 - 25.1.0.11 + 25.1.0.12 3.0.2 From 2914c6a8d8f08aa3b518f616689d3a2c96f29cfb Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:25:25 +0000 Subject: [PATCH 05/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.13 [skip docker_latest] until alfresco-enterprise-share triggers the build or it is built manually --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0da363e34c..7fee37bb2e 100644 --- a/pom.xml +++ b/pom.xml @@ -10,11 +10,11 @@ org.alfresco alfresco-enterprise-repo ../alfresco-enterprise-repo/pom.xml - 25.1.0.12 + 25.1.0.13 - 25.1.0.12 + 25.1.0.13 25.1.0.12 3.0.2 From e5c44855dae870ee33ba4fa8acaaec656012c7bb Mon Sep 17 00:00:00 2001 From: Cezary Witkowski Date: Thu, 12 Dec 2024 13:54:55 +0100 Subject: [PATCH 06/12] [ACS-9025] Use acs-event-model 1.0.0 (#2998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --------- Co-authored-by: Piotr Żurek --- pom.xml | 2 +- tests/environment/.env | 2 +- tests/environment/docker-compose-pipeline-all-amps.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 7fee37bb2e..6d378d5b16 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 5.0.3 3.2.0 2.9.0 - 5.1.0 + 5.2.0-A1 3.1.7 1.0.1 diff --git a/tests/environment/.env b/tests/environment/.env index f0a3de3c85..6abcb8b998 100644 --- a/tests/environment/.env +++ b/tests/environment/.env @@ -7,7 +7,7 @@ MSSQL_TAG=2019-CU28-ubuntu-20.04 ORACLE_TAG=19.3.0-ee ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8 KEYCLOAK_TAG=25.0.6 -SYNC_SERVICE_TAG=5.1.0 +SYNC_SERVICE_TAG=5.2.0-A1 TRANSFORM_ROUTER_TAG=4.1.5 TRANSFORM_CORE_AIO_TAG=5.1.5 SHARED_FILE_STORE_TAG=4.1.5 diff --git a/tests/environment/docker-compose-pipeline-all-amps.yml b/tests/environment/docker-compose-pipeline-all-amps.yml index 33f2070f39..b559a87531 100644 --- a/tests/environment/docker-compose-pipeline-all-amps.yml +++ b/tests/environment/docker-compose-pipeline-all-amps.yml @@ -180,7 +180,7 @@ services: - share sync-service: - image: quay.io/alfresco/service-sync:5.1.0 + image: quay.io/alfresco/service-sync:5.2.0-A1 mem_limit: 1g environment: JAVA_OPTS : " From 8359dfbf84334074f6c4d38e9b6ae74d11232926 Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Fri, 13 Dec 2024 05:56:35 +0000 Subject: [PATCH 07/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.13 - alfresco-enterprise-share: 25.1.0.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6d378d5b16..3864c090c7 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ 25.1.0.13 - 25.1.0.12 + 25.1.0.13 3.0.2 From 3f8ab7d8d990cc9adc427a359cc39b880f12c5cd Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:05:22 +0000 Subject: [PATCH 08/12] Update upstream versions - alfresco-enterprise-repo: 25.1.0.14 [skip docker_latest] until alfresco-enterprise-share triggers the build or it is built manually --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3864c090c7..8cc681b3a3 100644 --- a/pom.xml +++ b/pom.xml @@ -10,11 +10,11 @@ org.alfresco alfresco-enterprise-repo ../alfresco-enterprise-repo/pom.xml - 25.1.0.13 + 25.1.0.14 - 25.1.0.13 + 25.1.0.14 25.1.0.13 3.0.2 From e71a664d7f5e2e0235e5d88c3e5348734898698e Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Sun, 15 Dec 2024 00:46:18 +0000 Subject: [PATCH 09/12] [force][release][skip tests] Update upstream versions - alfresco-enterprise-repo: 25.1.0.15 - alfresco-enterprise-share: 25.1.0.14 --- .github/workflows/master_release.yml | 4 ++-- pom.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master_release.yml b/.github/workflows/master_release.yml index 730df44111..74ee74e965 100644 --- a/.github/workflows/master_release.yml +++ b/.github/workflows/master_release.yml @@ -22,8 +22,8 @@ env: GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 BASE_BUILD_NUMBER: 10000 # Release version has to start with real version (23.2.0-....) for the docker image to build successfully. - RELEASE_VERSION: 25.1.0-A.3 - DEVELOPMENT_VERSION: 25.1.0-A.4-SNAPSHOT + RELEASE_VERSION: 25.1.0-A.4 + DEVELOPMENT_VERSION: 25.1.0-A.5-SNAPSHOT jobs: run_ci: diff --git a/pom.xml b/pom.xml index 8cc681b3a3..31ca096c69 100644 --- a/pom.xml +++ b/pom.xml @@ -10,12 +10,12 @@ org.alfresco alfresco-enterprise-repo ../alfresco-enterprise-repo/pom.xml - 25.1.0.14 + 25.1.0.15 - 25.1.0.14 - 25.1.0.13 + 25.1.0.15 + 25.1.0.14 3.0.2 From 6b5eb59df93f3f165bea1d80520ab990c66e20a4 Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Sun, 15 Dec 2024 01:21:17 +0000 Subject: [PATCH 10/12] [maven-release-plugin][skip ci] prepare release 25.1.0-A.4 --- dev/dev-acs-amps-overlay/pom.xml | 2 +- dev/dev-repo-amps-overlay/pom.xml | 2 +- dev/dev-share-amps-overlay/pom.xml | 2 +- dev/dev-tomcat/pom.xml | 2 +- dev/pom.xml | 2 +- distribution-ags/pom.xml | 2 +- distribution-share/pom.xml | 2 +- distribution/pom.xml | 2 +- docker-alfresco/ags/pom.xml | 2 +- docker-alfresco/aws/pom.xml | 2 +- docker-alfresco/pom.xml | 2 +- docker-share/ags/pom.xml | 2 +- docker-share/aws/pom.xml | 2 +- docker-share/pom.xml | 2 +- pom.xml | 4 ++-- tests/pipeline-all-amps/pom.xml | 2 +- tests/pipeline-all-amps/repo/pom.xml | 2 +- tests/pipeline-all-amps/share/pom.xml | 2 +- tests/pom.xml | 2 +- tests/tas-all-amps/pom.xml | 2 +- tests/tas-cmis/pom.xml | 2 +- tests/tas-distribution-zip/pom.xml | 2 +- tests/tas-elasticsearch/pom.xml | 2 +- tests/tas-email/pom.xml | 2 +- tests/tas-integration/pom.xml | 2 +- tests/tas-mtls/pom.xml | 2 +- tests/tas-restapi/pom.xml | 2 +- tests/tas-sync-service/pom.xml | 2 +- tests/tas-webdav/pom.xml | 2 +- tests/testcontainers-env/pom.xml | 2 +- 30 files changed, 31 insertions(+), 31 deletions(-) diff --git a/dev/dev-acs-amps-overlay/pom.xml b/dev/dev-acs-amps-overlay/pom.xml index e9f5ac97c2..5ac5b678c2 100644 --- a/dev/dev-acs-amps-overlay/pom.xml +++ b/dev/dev-acs-amps-overlay/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/dev/dev-repo-amps-overlay/pom.xml b/dev/dev-repo-amps-overlay/pom.xml index 5f546753c6..20f982d801 100644 --- a/dev/dev-repo-amps-overlay/pom.xml +++ b/dev/dev-repo-amps-overlay/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/dev/dev-share-amps-overlay/pom.xml b/dev/dev-share-amps-overlay/pom.xml index 547e18f36b..8eaadbe6ef 100644 --- a/dev/dev-share-amps-overlay/pom.xml +++ b/dev/dev-share-amps-overlay/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/dev/dev-tomcat/pom.xml b/dev/dev-tomcat/pom.xml index b60135c584..9a129a3d9b 100644 --- a/dev/dev-tomcat/pom.xml +++ b/dev/dev-tomcat/pom.xml @@ -9,7 +9,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/dev/pom.xml b/dev/pom.xml index 9ae77ef506..927521751c 100644 --- a/dev/pom.xml +++ b/dev/pom.xml @@ -9,7 +9,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/distribution-ags/pom.xml b/distribution-ags/pom.xml index 6f85670fde..1113eca23e 100644 --- a/distribution-ags/pom.xml +++ b/distribution-ags/pom.xml @@ -8,7 +8,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/distribution-share/pom.xml b/distribution-share/pom.xml index f61be3ef42..9e5447194b 100644 --- a/distribution-share/pom.xml +++ b/distribution-share/pom.xml @@ -7,7 +7,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/distribution/pom.xml b/distribution/pom.xml index a956f6cdcc..76ca13828d 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -8,7 +8,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/docker-alfresco/ags/pom.xml b/docker-alfresco/ags/pom.xml index 9b95097f4a..e98e8a72bf 100644 --- a/docker-alfresco/ags/pom.xml +++ b/docker-alfresco/ags/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-services-docker - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 alfresco/alfresco-governance-repository-enterprise diff --git a/docker-alfresco/aws/pom.xml b/docker-alfresco/aws/pom.xml index 45f2041bd7..8c33234e0a 100644 --- a/docker-alfresco/aws/pom.xml +++ b/docker-alfresco/aws/pom.xml @@ -8,7 +8,7 @@ org.alfresco content-services-docker - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/docker-alfresco/pom.xml b/docker-alfresco/pom.xml index 2308b0cd1d..a4a6c27ea9 100644 --- a/docker-alfresco/pom.xml +++ b/docker-alfresco/pom.xml @@ -8,7 +8,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/docker-share/ags/pom.xml b/docker-share/ags/pom.xml index 5b6858004a..eac1ec9123 100644 --- a/docker-share/ags/pom.xml +++ b/docker-share/ags/pom.xml @@ -8,7 +8,7 @@ org.alfresco share-docker - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/docker-share/aws/pom.xml b/docker-share/aws/pom.xml index 4f98f52f11..be4adab7ad 100644 --- a/docker-share/aws/pom.xml +++ b/docker-share/aws/pom.xml @@ -7,7 +7,7 @@ org.alfresco share-docker - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/docker-share/pom.xml b/docker-share/pom.xml index ac81c5efaa..645209b3d5 100644 --- a/docker-share/pom.xml +++ b/docker-share/pom.xml @@ -7,7 +7,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/pom.xml b/pom.xml index 31ca096c69..5fb3dfde9f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ acs-packaging pom Alfresco Content Services Packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 org.alfresco @@ -37,7 +37,7 @@ scm:git:https://github.com/Alfresco/acs-packaging.git scm:git:https://github.com/Alfresco/acs-packaging.git https://github.com/Alfresco/acs-packaging - HEAD + 25.1.0-A.4 diff --git a/tests/pipeline-all-amps/pom.xml b/tests/pipeline-all-amps/pom.xml index d15d9fc49c..2f3f68625c 100644 --- a/tests/pipeline-all-amps/pom.xml +++ b/tests/pipeline-all-amps/pom.xml @@ -7,7 +7,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 ../pom.xml diff --git a/tests/pipeline-all-amps/repo/pom.xml b/tests/pipeline-all-amps/repo/pom.xml index 6d9aa00d12..75b0e3b573 100644 --- a/tests/pipeline-all-amps/repo/pom.xml +++ b/tests/pipeline-all-amps/repo/pom.xml @@ -5,7 +5,7 @@ org.alfresco pipeline-all-amps - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 alfresco-pipeline-all-amps-repo diff --git a/tests/pipeline-all-amps/share/pom.xml b/tests/pipeline-all-amps/share/pom.xml index 8523e38c57..4d467403aa 100644 --- a/tests/pipeline-all-amps/share/pom.xml +++ b/tests/pipeline-all-amps/share/pom.xml @@ -5,7 +5,7 @@ org.alfresco pipeline-all-amps - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 alfresco-pipeline-all-amps-share diff --git a/tests/pom.xml b/tests/pom.xml index a971d37152..62fc843e9a 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -7,7 +7,7 @@ org.alfresco acs-packaging - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-all-amps/pom.xml b/tests/tas-all-amps/pom.xml index ea52faef10..8ddeb22e39 100644 --- a/tests/tas-all-amps/pom.xml +++ b/tests/tas-all-amps/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-cmis/pom.xml b/tests/tas-cmis/pom.xml index c7d5b720a3..8712e53991 100644 --- a/tests/tas-cmis/pom.xml +++ b/tests/tas-cmis/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-distribution-zip/pom.xml b/tests/tas-distribution-zip/pom.xml index a47b674120..0d65cd5555 100644 --- a/tests/tas-distribution-zip/pom.xml +++ b/tests/tas-distribution-zip/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-elasticsearch/pom.xml b/tests/tas-elasticsearch/pom.xml index 9fa5cad2b1..1f48ed0242 100644 --- a/tests/tas-elasticsearch/pom.xml +++ b/tests/tas-elasticsearch/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-email/pom.xml b/tests/tas-email/pom.xml index f061c4fa11..6648745cd8 100644 --- a/tests/tas-email/pom.xml +++ b/tests/tas-email/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-integration/pom.xml b/tests/tas-integration/pom.xml index 951550b600..7d7fda5be2 100644 --- a/tests/tas-integration/pom.xml +++ b/tests/tas-integration/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-mtls/pom.xml b/tests/tas-mtls/pom.xml index 2e30b7361f..29d46559c8 100644 --- a/tests/tas-mtls/pom.xml +++ b/tests/tas-mtls/pom.xml @@ -8,7 +8,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-restapi/pom.xml b/tests/tas-restapi/pom.xml index 17d8dfe828..a60e19d61a 100644 --- a/tests/tas-restapi/pom.xml +++ b/tests/tas-restapi/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-sync-service/pom.xml b/tests/tas-sync-service/pom.xml index 277d4cfb92..0b57b824ae 100644 --- a/tests/tas-sync-service/pom.xml +++ b/tests/tas-sync-service/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/tas-webdav/pom.xml b/tests/tas-webdav/pom.xml index 4f3939a55f..37450da1c0 100644 --- a/tests/tas-webdav/pom.xml +++ b/tests/tas-webdav/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 diff --git a/tests/testcontainers-env/pom.xml b/tests/testcontainers-env/pom.xml index 9a3dfecf78..5e56e1ea99 100644 --- a/tests/testcontainers-env/pom.xml +++ b/tests/testcontainers-env/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4-SNAPSHOT + 25.1.0-A.4 From d3bdd62b65e03f0f7b2c867b61d890b7d926f1d9 Mon Sep 17 00:00:00 2001 From: alfresco-build <8039454+alfresco-build@users.noreply.github.com> Date: Sun, 15 Dec 2024 01:21:18 +0000 Subject: [PATCH 11/12] [maven-release-plugin][skip ci] prepare for next development iteration --- dev/dev-acs-amps-overlay/pom.xml | 2 +- dev/dev-repo-amps-overlay/pom.xml | 2 +- dev/dev-share-amps-overlay/pom.xml | 2 +- dev/dev-tomcat/pom.xml | 2 +- dev/pom.xml | 2 +- distribution-ags/pom.xml | 2 +- distribution-share/pom.xml | 2 +- distribution/pom.xml | 2 +- docker-alfresco/ags/pom.xml | 2 +- docker-alfresco/aws/pom.xml | 2 +- docker-alfresco/pom.xml | 2 +- docker-share/ags/pom.xml | 2 +- docker-share/aws/pom.xml | 2 +- docker-share/pom.xml | 2 +- pom.xml | 4 ++-- tests/pipeline-all-amps/pom.xml | 2 +- tests/pipeline-all-amps/repo/pom.xml | 2 +- tests/pipeline-all-amps/share/pom.xml | 2 +- tests/pom.xml | 2 +- tests/tas-all-amps/pom.xml | 2 +- tests/tas-cmis/pom.xml | 2 +- tests/tas-distribution-zip/pom.xml | 2 +- tests/tas-elasticsearch/pom.xml | 2 +- tests/tas-email/pom.xml | 2 +- tests/tas-integration/pom.xml | 2 +- tests/tas-mtls/pom.xml | 2 +- tests/tas-restapi/pom.xml | 2 +- tests/tas-sync-service/pom.xml | 2 +- tests/tas-webdav/pom.xml | 2 +- tests/testcontainers-env/pom.xml | 2 +- 30 files changed, 31 insertions(+), 31 deletions(-) diff --git a/dev/dev-acs-amps-overlay/pom.xml b/dev/dev-acs-amps-overlay/pom.xml index 5ac5b678c2..da639f7895 100644 --- a/dev/dev-acs-amps-overlay/pom.xml +++ b/dev/dev-acs-amps-overlay/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/dev/dev-repo-amps-overlay/pom.xml b/dev/dev-repo-amps-overlay/pom.xml index 20f982d801..d782d23d91 100644 --- a/dev/dev-repo-amps-overlay/pom.xml +++ b/dev/dev-repo-amps-overlay/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/dev/dev-share-amps-overlay/pom.xml b/dev/dev-share-amps-overlay/pom.xml index 8eaadbe6ef..04b520e63e 100644 --- a/dev/dev-share-amps-overlay/pom.xml +++ b/dev/dev-share-amps-overlay/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/dev/dev-tomcat/pom.xml b/dev/dev-tomcat/pom.xml index 9a129a3d9b..50dd8696b9 100644 --- a/dev/dev-tomcat/pom.xml +++ b/dev/dev-tomcat/pom.xml @@ -9,7 +9,7 @@ org.alfresco alfresco-dev-tomcat-env - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/dev/pom.xml b/dev/pom.xml index 927521751c..ffdf6a5605 100644 --- a/dev/pom.xml +++ b/dev/pom.xml @@ -9,7 +9,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/distribution-ags/pom.xml b/distribution-ags/pom.xml index 1113eca23e..789417ca3c 100644 --- a/distribution-ags/pom.xml +++ b/distribution-ags/pom.xml @@ -8,7 +8,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/distribution-share/pom.xml b/distribution-share/pom.xml index 9e5447194b..d6885538e4 100644 --- a/distribution-share/pom.xml +++ b/distribution-share/pom.xml @@ -7,7 +7,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/distribution/pom.xml b/distribution/pom.xml index 76ca13828d..a59c64f511 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -8,7 +8,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/docker-alfresco/ags/pom.xml b/docker-alfresco/ags/pom.xml index e98e8a72bf..8cd95c7994 100644 --- a/docker-alfresco/ags/pom.xml +++ b/docker-alfresco/ags/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-services-docker - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT alfresco/alfresco-governance-repository-enterprise diff --git a/docker-alfresco/aws/pom.xml b/docker-alfresco/aws/pom.xml index 8c33234e0a..653dc45635 100644 --- a/docker-alfresco/aws/pom.xml +++ b/docker-alfresco/aws/pom.xml @@ -8,7 +8,7 @@ org.alfresco content-services-docker - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/docker-alfresco/pom.xml b/docker-alfresco/pom.xml index a4a6c27ea9..e8f8f9b553 100644 --- a/docker-alfresco/pom.xml +++ b/docker-alfresco/pom.xml @@ -8,7 +8,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/docker-share/ags/pom.xml b/docker-share/ags/pom.xml index eac1ec9123..144ca47150 100644 --- a/docker-share/ags/pom.xml +++ b/docker-share/ags/pom.xml @@ -8,7 +8,7 @@ org.alfresco share-docker - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/docker-share/aws/pom.xml b/docker-share/aws/pom.xml index be4adab7ad..022eda3586 100644 --- a/docker-share/aws/pom.xml +++ b/docker-share/aws/pom.xml @@ -7,7 +7,7 @@ org.alfresco share-docker - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/docker-share/pom.xml b/docker-share/pom.xml index 645209b3d5..d5479393ec 100644 --- a/docker-share/pom.xml +++ b/docker-share/pom.xml @@ -7,7 +7,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/pom.xml b/pom.xml index 5fb3dfde9f..e56ac1bd2e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ acs-packaging pom Alfresco Content Services Packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT org.alfresco @@ -37,7 +37,7 @@ scm:git:https://github.com/Alfresco/acs-packaging.git scm:git:https://github.com/Alfresco/acs-packaging.git https://github.com/Alfresco/acs-packaging - 25.1.0-A.4 + HEAD diff --git a/tests/pipeline-all-amps/pom.xml b/tests/pipeline-all-amps/pom.xml index 2f3f68625c..68daa71216 100644 --- a/tests/pipeline-all-amps/pom.xml +++ b/tests/pipeline-all-amps/pom.xml @@ -7,7 +7,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT ../pom.xml diff --git a/tests/pipeline-all-amps/repo/pom.xml b/tests/pipeline-all-amps/repo/pom.xml index 75b0e3b573..8de9ce41d9 100644 --- a/tests/pipeline-all-amps/repo/pom.xml +++ b/tests/pipeline-all-amps/repo/pom.xml @@ -5,7 +5,7 @@ org.alfresco pipeline-all-amps - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT alfresco-pipeline-all-amps-repo diff --git a/tests/pipeline-all-amps/share/pom.xml b/tests/pipeline-all-amps/share/pom.xml index 4d467403aa..caa60d0894 100644 --- a/tests/pipeline-all-amps/share/pom.xml +++ b/tests/pipeline-all-amps/share/pom.xml @@ -5,7 +5,7 @@ org.alfresco pipeline-all-amps - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT alfresco-pipeline-all-amps-share diff --git a/tests/pom.xml b/tests/pom.xml index 62fc843e9a..6cc0ac0d84 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -7,7 +7,7 @@ org.alfresco acs-packaging - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-all-amps/pom.xml b/tests/tas-all-amps/pom.xml index 8ddeb22e39..4defc8ae65 100644 --- a/tests/tas-all-amps/pom.xml +++ b/tests/tas-all-amps/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-cmis/pom.xml b/tests/tas-cmis/pom.xml index 8712e53991..310e45554b 100644 --- a/tests/tas-cmis/pom.xml +++ b/tests/tas-cmis/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-distribution-zip/pom.xml b/tests/tas-distribution-zip/pom.xml index 0d65cd5555..365b26d3e6 100644 --- a/tests/tas-distribution-zip/pom.xml +++ b/tests/tas-distribution-zip/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-elasticsearch/pom.xml b/tests/tas-elasticsearch/pom.xml index 1f48ed0242..b1ab839a55 100644 --- a/tests/tas-elasticsearch/pom.xml +++ b/tests/tas-elasticsearch/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-email/pom.xml b/tests/tas-email/pom.xml index 6648745cd8..c213d35275 100644 --- a/tests/tas-email/pom.xml +++ b/tests/tas-email/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-integration/pom.xml b/tests/tas-integration/pom.xml index 7d7fda5be2..b7178d4222 100644 --- a/tests/tas-integration/pom.xml +++ b/tests/tas-integration/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-mtls/pom.xml b/tests/tas-mtls/pom.xml index 29d46559c8..9e4e8c0774 100644 --- a/tests/tas-mtls/pom.xml +++ b/tests/tas-mtls/pom.xml @@ -8,7 +8,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-restapi/pom.xml b/tests/tas-restapi/pom.xml index a60e19d61a..9975d72a22 100644 --- a/tests/tas-restapi/pom.xml +++ b/tests/tas-restapi/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-sync-service/pom.xml b/tests/tas-sync-service/pom.xml index 0b57b824ae..0510b298ec 100644 --- a/tests/tas-sync-service/pom.xml +++ b/tests/tas-sync-service/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/tas-webdav/pom.xml b/tests/tas-webdav/pom.xml index 37450da1c0..ae1c0a6360 100644 --- a/tests/tas-webdav/pom.xml +++ b/tests/tas-webdav/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT diff --git a/tests/testcontainers-env/pom.xml b/tests/testcontainers-env/pom.xml index 5e56e1ea99..d5d4646f2d 100644 --- a/tests/testcontainers-env/pom.xml +++ b/tests/testcontainers-env/pom.xml @@ -9,7 +9,7 @@ org.alfresco content-repository-tests - 25.1.0-A.4 + 25.1.0-A.5-SNAPSHOT From 430b0d1a6256ffca93566c646cde4c87cfd4b303 Mon Sep 17 00:00:00 2001 From: Cezary Witkowski Date: Mon, 16 Dec 2024 13:12:15 +0100 Subject: [PATCH 12/12] [ACS-9069] Fix failing tests in acs-packaging related to durable subscription in live indexing (#3001) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --------- Co-authored-by: Piotr Żurek --- .../ElasticsearchInitialReindexingTests.java | 60 +-- .../ElasticsearchReindexingTests.java | 375 +++++++++--------- .../tas/AlfrescoStackInitializer.java | 14 +- 3 files changed, 209 insertions(+), 240 deletions(-) diff --git a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/initialReindex/ElasticsearchInitialReindexingTests.java b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/initialReindex/ElasticsearchInitialReindexingTests.java index a94760d7f5..f7ea0fb49d 100644 --- a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/initialReindex/ElasticsearchInitialReindexingTests.java +++ b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/initialReindex/ElasticsearchInitialReindexingTests.java @@ -1,9 +1,9 @@ package org.alfresco.elasticsearch.initialReindex; import static org.alfresco.elasticsearch.SearchQueryService.req; -import static org.alfresco.tas.AlfrescoStackInitializer.getImagesConfig; +import static org.alfresco.tas.AlfrescoStackInitializer.reindex; +import static org.alfresco.utility.model.FileType.TEXT_PLAIN; -import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -13,19 +13,15 @@ import org.alfresco.utility.data.DataContent; import org.alfresco.utility.data.DataSite; import org.alfresco.utility.data.DataUser; +import org.alfresco.utility.model.FileModel; +import org.alfresco.utility.model.SiteModel; import org.alfresco.utility.model.TestGroup; +import org.alfresco.utility.model.UserModel; import org.alfresco.utility.network.ServerHealth; import org.alfresco.utility.report.log.Step; -import org.apache.http.HttpHost; -import org.opensearch.client.RestClient; -import org.opensearch.client.RestHighLevelClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; -import org.testcontainers.containers.GenericContainer; -import org.testcontainers.containers.startupcheck.IndefiniteWaitOneShotStartupCheckStrategy; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,10 +33,6 @@ public class ElasticsearchInitialReindexingTests extends AbstractTestNGSpringContextTests { - private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchInitialReindexingTests.class); - - public static final String CUSTOM_ALFRESCO_INDEX = "custom-alfresco-index"; - @Autowired private ServerHealth serverHealth; @Autowired @@ -52,11 +44,8 @@ public class ElasticsearchInitialReindexingTests extends AbstractTestNGSpringCon @Autowired protected SearchQueryService searchQueryService; - private org.alfresco.utility.model.UserModel testUser; - - private org.alfresco.utility.model.SiteModel testSite; - - private RestHighLevelClient elasticClient; + private UserModel testUser; + private SiteModel testSite; /** * Create a user and a private site and wait for these to be indexed. @@ -72,13 +61,6 @@ public void dataPreparation() testUser = dataUser.createRandomTestUser(); testSite = dataSite.usingUser(testUser).createPrivateRandomSite(); createDocument(); - - Step.STEP("create ES client"); - elasticClient = new RestHighLevelClient( - RestClient.builder(new HttpHost(AlfrescoStackInitializer.searchEngineContainer.getContainerIpAddress(), - AlfrescoStackInitializer.searchEngineContainer.getFirstMappedPort(), - "http"))); - } /** @@ -96,36 +78,14 @@ public void testReindexerIndexesSystemDocuments() // WHEN // Run reindexer against the initial documents. reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByIds", - "ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX, - "ALFRESCO_REINDEX_FROM_ID", "0", - "ALFRESCO_REINDEX_TO_ID", "1000")); + "ALFRESCO_REINDEX_FROM_ID", "0", + "ALFRESCO_REINDEX_TO_ID", "1000")); // THEN // Check system document is indexed. searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), "budget.xls"); } - /** - * Run the alfresco-elasticsearch-reindexing container. - * - * @param envParam Any environment variables to override from the defaults. - */ - private void reindex(Map envParam) - { - // Run the reindexing container. - Map env = AlfrescoStackInitializer.getReindexEnvBasic(); - env.putAll(envParam); - - try (GenericContainer reindexingComponent = new GenericContainer(getImagesConfig().getReIndexingImage()) - .withEnv(env) - .withNetwork(AlfrescoStackInitializer.network) - .withStartupCheckStrategy( - new IndefiniteWaitOneShotStartupCheckStrategy())) - { - reindexingComponent.start(); - } - } - /** * Create a document using in the test site using the test user. * @@ -136,7 +96,7 @@ private String createDocument() String documentName = "TestFile" + UUID.randomUUID() + ".txt"; dataContent.usingUser(testUser) .usingSite(testSite) - .createContent(new org.alfresco.utility.model.FileModel(documentName, org.alfresco.utility.model.FileType.TEXT_PLAIN, "content")); + .createContent(new FileModel(documentName, TEXT_PLAIN, "content")); return documentName; } } diff --git a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java index 75017d3984..4b32d969b4 100644 --- a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java +++ b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java @@ -1,7 +1,11 @@ package org.alfresco.elasticsearch.reindexing; import static org.alfresco.elasticsearch.SearchQueryService.req; -import static org.alfresco.tas.AlfrescoStackInitializer.getImagesConfig; +import static org.alfresco.tas.AlfrescoStackInitializer.CUSTOM_ALFRESCO_INDEX; +import static org.alfresco.tas.AlfrescoStackInitializer.liveIndexer; +import static org.alfresco.tas.AlfrescoStackInitializer.reindex; +import static org.alfresco.tas.AlfrescoStackInitializer.searchEngineContainer; +import static org.alfresco.utility.model.FileType.TEXT_PLAIN; import static org.alfresco.utility.report.log.Step.STEP; import static org.junit.Assert.fail; @@ -18,7 +22,10 @@ import org.alfresco.utility.data.DataContent; import org.alfresco.utility.data.DataSite; import org.alfresco.utility.data.DataUser; +import org.alfresco.utility.model.FileModel; +import org.alfresco.utility.model.SiteModel; import org.alfresco.utility.model.TestGroup; +import org.alfresco.utility.model.UserModel; import org.alfresco.utility.network.ServerHealth; import org.apache.http.HttpHost; import org.opensearch.client.RequestOptions; @@ -30,8 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; -import org.testcontainers.containers.GenericContainer; -import org.testcontainers.containers.startupcheck.IndefiniteWaitOneShotStartupCheckStrategy; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -40,11 +45,9 @@ */ @ContextConfiguration(locations = "classpath:alfresco-elasticsearch-context.xml", initializers = AlfrescoStackInitializer.class) -@SuppressWarnings("PMD.JUnit4TestShouldUseTestAnnotation") // these are testng tests +@SuppressWarnings({"PMD.JUnit4TestShouldUseTestAnnotation", "PMD.JUnitTestsShouldIncludeAssert"}) // these are testng tests public class ElasticsearchReindexingTests extends AbstractTestNGSpringContextTests { - public static final String CUSTOM_ALFRESCO_INDEX = "custom-alfresco-index"; - @Autowired private ServerHealth serverHealth; @Autowired @@ -56,15 +59,10 @@ public class ElasticsearchReindexingTests extends AbstractTestNGSpringContextTes @Autowired protected SearchQueryService searchQueryService; - private org.alfresco.utility.model.UserModel testUser; - - private org.alfresco.utility.model.SiteModel testSite; - + private UserModel testUser; + private SiteModel testSite; private RestHighLevelClient elasticClient; - /** - * Create a user and a private site and wait for these to be indexed. - */ @BeforeClass(alwaysRun = true) public void dataPreparation() { @@ -75,284 +73,286 @@ public void dataPreparation() testUser = dataUser.createRandomTestUser(); testSite = dataSite.usingUser(testUser).createPrivateRandomSite(); - createDocument(); + createDocumentWithRandomName(); STEP("create ES client"); elasticClient = new RestHighLevelClient( - RestClient.builder(new HttpHost(AlfrescoStackInitializer.searchEngineContainer.getContainerIpAddress(), - AlfrescoStackInitializer.searchEngineContainer.getFirstMappedPort(), + RestClient.builder(new HttpHost(searchEngineContainer.getContainerIpAddress(), + searchEngineContainer.getFirstMappedPort(), "http"))); - } @Test(groups = TestGroup.SEARCH) public void testReindexerFixesBrokenIndex() { // GIVEN - - // Delete all documents inside Elasticsearch. cleanUpIndex(); - //stop live indexing - AlfrescoStackInitializer.liveIndexer.stop(); - // Create document. - - String testStart = DateTimeFormatter.ofPattern("yyyyMMddHHmm").format(ZonedDateTime.now(Clock.systemUTC())); - String documentName = createDocument(); + liveIndexer.stop(); + String reindexerStartTime = getReindexerStartTimeNow(); + String documentName = createDocumentWithRandomName(); // Check document not indexed. // Nb. The cm:name:* term ensures that the query hits the index rather than the db. - SearchRequest query = req("cm:name:" + documentName + " AND cm:name:*"); searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser()); // WHEN // Run reindexer (leaving ALFRESCO_REINDEX_TO_TIME as default). - try(GenericContainer reindexingComponent = createReindexContainer(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", - "ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX, - "ALFRESCO_REINDEX_FROM_TIME", testStart))) { - //Reindex - reindexingComponent.start(); - - // THEN - // Check document indexed. - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - } + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime)); + + // THEN + // Check document indexed. + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); + // TIDY - // Restart ElasticsearchConnector. cleanUpIndex(); - AlfrescoStackInitializer.liveIndexer.start(); - + liveIndexer.start(); } @Test(groups = TestGroup.SEARCH) public void testRecreateIndex() { // GIVEN - // Create document. - String documentName = createDocument(); - // Stop ElasticsearchConnector. - AlfrescoStackInitializer.liveIndexer.stop(); - // Delete index documents. + String documentName = createDocumentWithRandomName(); + liveIndexer.stop(); cleanUpIndex(); // WHEN // Run reindexer (with default dates to reindex everything). - try(GenericContainer reindexingComponent = createReindexContainer(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", - "ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX))) { - //Reindex - reindexingComponent.start(); - - // THEN - // Check document indexed. - // Nb. The cm:name:* term ensures that the query hits the index rather than the db. - SearchRequest query = req("cm:name:" + documentName + " AND cm:name:*"); - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - } + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate")); + + // THEN + // Check document indexed. + // Nb. The cm:name:* term ensures that the query hits the index rather than the db. + SearchRequest query = req("cm:name:" + documentName + " AND cm:name:*"); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); // TIDY // Restart ElasticsearchConnector. cleanUpIndex(); - AlfrescoStackInitializer.liveIndexer.start(); - + liveIndexer.start(); } - /** - * Common testing method for reindexing enabled and disabled features tests. - * @param metadataIndexingEnabled Reindexing metadata is enabled when true, disabled when false - * @param contentIndexingEnabled Reindexing content is enabled when true, disabled when false - * @param pathIndexingEnabled Reindexing path is enabled when true, disabled when false - * @param queryString Verification query string. It may include a mark that is replaced by the actual document name created. - * @param expectingDocNameAsResult Result from verification query string is the name of the document created when true, empty result when false. - */ - private void internalTestEnabledFeatures( - Boolean metadataIndexingEnabled, - Boolean contentIndexingEnabled, - Boolean pathIndexingEnabled, - String queryString, - Boolean expectingDocNameAsResult - ) + @Test(groups = TestGroup.SEARCH) + public void testRecreateIndexWithMetadataAndContent() { - // Initial timestamp for reindexing by date: this will save reindexing time for these tests - ZonedDateTime now = ZonedDateTime.now(Clock.systemUTC()); - // ACS-5044 Increased time to 20 minutes as 10 minutes proved insufficient to prevent intermittent failures - String testStart = DateTimeFormatter.ofPattern("yyyyMMddHHmm").format(now.minusMinutes(20)); - // GIVEN - // Stop ElasticsearchConnector - AlfrescoStackInitializer.liveIndexer.stop(); - // Create document - String documentName = createDocument(); - // Delete index documents + String reindexerStartTime = getReindexerStartTimeTwentyMinutesAgo(); + liveIndexer.stop(); + String documentName = createDocumentWithRandomName(); cleanUpIndex(); - // Restart ElasticsearchConnector to Index Content - AlfrescoStackInitializer.liveIndexer.start(); + // Reindexer requires lifeIndexer to index content. + liveIndexer.start(); // WHEN // Run reindexer leaving ALFRESCO_REINDEX_TO_TIME as default - try(GenericContainer reindexingComponent = createReindexContainer(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", - "ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX, - "ALFRESCO_REINDEX_FROM_TIME", testStart, - "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", metadataIndexingEnabled.toString(), - "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", contentIndexingEnabled.toString(), - "ALFRESCO_REINDEX_PATHINDEXINGENABLED", pathIndexingEnabled.toString()))) { - //Reindex - reindexingComponent.start(); - - // THEN - SearchRequest query = req(queryString.replace("", documentName)); - - if (expectingDocNameAsResult) { - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - } else { - searchQueryService.expectNoResultsFromQuery(query, dataUser.getAdminUser()); - } - } - - } - - @Test(groups = TestGroup.SEARCH) - public void testRecreateIndexWithMetadataAndContent() - { - internalTestEnabledFeatures(true, true, false, - "cm:name:'' AND TEXT:'content'", true); + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime, + "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_PATHINDEXINGENABLED", "false")); + + // THEN + // Document is still indexed after reindexing. + SearchRequest query = req("cm:name:'" + documentName + "' AND TEXT:'content'"); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); } @Test(groups = TestGroup.SEARCH) public void testRecreateIndexWithMetadataAndNoContent() { - internalTestEnabledFeatures(true, false, false, - "cm:name:'' AND TEXT:'content'", false); + // GIVEN + String reindexerStartTime = getReindexerStartTimeTwentyMinutesAgo(); + liveIndexer.stop(); + String documentName = createDocumentWithRandomName(); + cleanUpIndex(); + + // WHEN + // Run reindexer leaving ALFRESCO_REINDEX_TO_TIME as default + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime, + "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", "false", + "ALFRESCO_REINDEX_PATHINDEXINGENABLED", "false")); + + // THEN + SearchRequest query = req("cm:name:'" + documentName + "' AND TEXT:'content'"); + searchQueryService.expectNoResultsFromQuery(query, dataUser.getAdminUser()); } @Test(groups = TestGroup.SEARCH) public void testRecreateIndexWithNoMetadataAndContent() { + // GIVEN + String reindexerStartTime = getReindexerStartTimeTwentyMinutesAgo(); + liveIndexer.stop(); + String documentName = createDocumentWithRandomName(); + cleanUpIndex(); + // Reindexer requires lifeIndexer to index content. + liveIndexer.start(); + + // WHEN + // Run reindexer leaving ALFRESCO_REINDEX_TO_TIME as default + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime, + "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", "false", + "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_PATHINDEXINGENABLED", "false")); + + // THEN // When not using metadata, document shouldn't be present in Elasticsearch index, // since metadata reindexing process is indexing also permissions - internalTestEnabledFeatures(false, true, false, - "cm:name:'' AND cm:name:*", false); + SearchRequest query = req("cm:name:'" + documentName + "' AND cm:name:*"); + searchQueryService.expectNoResultsFromQuery(query, dataUser.getAdminUser()); } @Test(groups = TestGroup.SEARCH) public void testRecreateIndexWithMetadataAndNoContentAndPath() { - internalTestEnabledFeatures(true, false, true, - "cm:name:'' AND PATH:'/app:company_home/st:sites/cm:" + testSite + "/cm:documentLibrary/cm:'", true); + // GIVEN + String reindexerStartTime = getReindexerStartTimeTwentyMinutesAgo(); + liveIndexer.stop(); + String documentName = createDocumentWithRandomName(); + cleanUpIndex(); + + // WHEN + // Run reindexer leaving ALFRESCO_REINDEX_TO_TIME as default + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime, + "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", "false", + "ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true")); + + // THEN + SearchRequest query = req("cm:name:'%s' AND PATH:'/app:company_home/st:sites/cm:%s/cm:documentLibrary/cm:%s'".formatted(documentName, testSite, documentName)); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); } @Test(groups = TestGroup.SEARCH) public void testRecreateIndexWithMetadataAndContentAndPath() { - internalTestEnabledFeatures(true, true, true, - "cm:name:'' AND TEXT:'content' " + - "AND PATH:'/app:company_home/st:sites/cm:" + testSite + "/cm:documentLibrary/cm:'", true); + // GIVEN + String reindexerStartTime = getReindexerStartTimeTwentyMinutesAgo(); + liveIndexer.stop(); + String documentName = createDocumentWithRandomName(); + cleanUpIndex(); + // Reindexer requires lifeIndexer to index content. + liveIndexer.start(); + + // WHEN + // Run reindexer leaving ALFRESCO_REINDEX_TO_TIME as default + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime, + "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true")); + + // THEN + SearchRequest query = req("cm:name:'%s' AND TEXT:'content' AND PATH:'/app:company_home/st:sites/cm:%s/cm:documentLibrary/cm:%s'".formatted(documentName, testSite, documentName)); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); } @Test(groups = TestGroup.SEARCH) public void testRecreateIndexWithNoMetadataAndPath() { + // GIVEN + String reindexerStartTime = getReindexerStartTimeTwentyMinutesAgo(); + liveIndexer.stop(); + String documentName = createDocumentWithRandomName(); + cleanUpIndex(); + + // WHEN + // Run reindexer leaving ALFRESCO_REINDEX_TO_TIME as default + reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", + "ALFRESCO_REINDEX_FROM_TIME", reindexerStartTime, + "ALFRESCO_REINDEX_METADATAINDEXINGENABLED", "false", + "ALFRESCO_REINDEX_CONTENTINDEXINGENABLED", "false", + "ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true")); + + // THEN // When not using metadata, document shouldn't be present in Elasticsearch index, // since metadata reindexing process is indexing also permissions - internalTestEnabledFeatures(false, false, true, - "cm:name:'' AND cm:name:*", false); + SearchRequest query = req("cm:name:'" + documentName + "' AND cm:name:*"); + searchQueryService.expectNoResultsFromQuery(query, dataUser.getAdminUser()); } @Test (groups = TestGroup.SEARCH) public void testPathReindex() { // GIVEN - // Create document. - String documentName = createDocument(); - // Stop ElasticsearchConnector. - AlfrescoStackInitializer.liveIndexer.stop(); - // Delete index documents. + String documentName = createDocumentWithRandomName(); + liveIndexer.stop(); cleanUpIndex(); // WHEN // Run reindexer with path indexing enabled (and with default dates to reindex everything). - try(GenericContainer reindexingComponent = createReindexContainer(Map.of("ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true", - "ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", - "ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX))) { - //Reindex - reindexingComponent.start(); - - // THEN - // Check path indexed. - // Nb. The cm:name:* term ensures that the query hits the index rather than the db. - SearchRequest query = req("PATH:\"//" + documentName + "\" AND cm:name:*"); - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - // Also check that the document can be obtained by a path query against the site. - query = req("PATH:\"//" + testSite.getTitle() + "/documentLibrary/*\" AND cm:name:" + documentName + " AND cm:name:*"); - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - } + reindex(Map.of("ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_JOB_NAME", "reindexByDate")); + + // THEN + // Check path indexed. + // Nb. The cm:name:* term ensures that the query hits the index rather than the db. + SearchRequest query = req("PATH:\"//" + documentName + "\" AND cm:name:*"); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); + // Also check that the document can be obtained by a path query against the site. + query = req("PATH:\"//" + testSite.getTitle() + "/documentLibrary/*\" AND cm:name:" + documentName + " AND cm:name:*"); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); // TIDY - // Restart ElasticsearchConnector. - AlfrescoStackInitializer.liveIndexer.start(); + liveIndexer.start(); } @Test (groups = TestGroup.SEARCH) public void testPathReindexQueryWithNamespaces() { // GIVEN - // Create document. - String documentName = createDocument(); - // Stop ElasticsearchConnector. - AlfrescoStackInitializer.liveIndexer.stop(); - // Delete index documents. + String documentName = createDocumentWithRandomName(); + liveIndexer.stop(); cleanUpIndex(); // WHEN // Run reindexer with path indexing enabled (and with default dates to reindex everything). - try(GenericContainer reindexingComponent = createReindexContainer(Map.of("ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true", - "ALFRESCO_REINDEX_JOB_NAME", "reindexByDate", - "ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX))) { - //Reindex - reindexingComponent.start(); - - // THEN - // Check path indexed. - // Nb. The cm:name:* term ensures that the query hits the index rather than the db. - SearchRequest query = req("PATH:\"//cm:" + documentName + "\" AND cm:name:*"); - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - // Also check that the document can be obtained by a path query against the site. - query = req("PATH:\"//cm:" + testSite.getTitle() + "/cm:documentLibrary/*\" AND cm:name:" + documentName + " AND cm:name:*"); - searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); - } + reindex(Map.of("ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true", + "ALFRESCO_REINDEX_JOB_NAME", "reindexByDate")); + + // THEN + // Check path indexed. + // Nb. The cm:name:* term ensures that the query hits the index rather than the db. + SearchRequest query = req("PATH:\"//cm:" + documentName + "\" AND cm:name:*"); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); + // Also check that the document can be obtained by a path query against the site. + query = req("PATH:\"//cm:" + testSite.getTitle() + "/cm:documentLibrary/*\" AND cm:name:" + documentName + " AND cm:name:*"); + searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), documentName); // TIDY - // Restart ElasticsearchConnector. - AlfrescoStackInitializer.liveIndexer.start(); + liveIndexer.start(); } - /** - * Run the alfresco-elasticsearch-reindexing container. - * - * @param envParam Any environment variables to override from the defaults. - * @return reindex container - */ - private GenericContainer createReindexContainer(Map envParam) + private String getReindexerStartTimeNow() { - // Run the reindexing container. - Map env = AlfrescoStackInitializer.getReindexEnvBasic(); - env.putAll(envParam); - - return new GenericContainer(getImagesConfig().getReIndexingImage()) - .withEnv(env) - .withNetwork(AlfrescoStackInitializer.network) - .withStartupCheckStrategy(new IndefiniteWaitOneShotStartupCheckStrategy()); + ZonedDateTime now = ZonedDateTime.now(Clock.systemUTC()); + return formatTimeForReindexer(now); } - /** - * Create a document using in the test site using the test user. - * - * @return The randomly generated name of the new document. - */ - private String createDocument() + private String getReindexerStartTimeTwentyMinutesAgo() + { + // Initial timestamp for reindexing by date: this will save reindexing time for these tests + ZonedDateTime now = ZonedDateTime.now(Clock.systemUTC()); + // ACS-5044 Increased time to 20 minutes as 10 minutes proved insufficient to prevent intermittent failures + return formatTimeForReindexer(now.minusMinutes(20)); + } + + private String formatTimeForReindexer(ZonedDateTime zonedDateTime) + { + return DateTimeFormatter.ofPattern("yyyyMMddHHmm").format(zonedDateTime); + } + + private String createDocumentWithRandomName() { String documentName = "TestFile" + UUID.randomUUID() + ".txt"; dataContent.usingUser(testUser) .usingSite(testSite) - .createContent(new org.alfresco.utility.model.FileModel(documentName, org.alfresco.utility.model.FileType.TEXT_PLAIN, "content")); + .createContent(new FileModel(documentName, TEXT_PLAIN, "content")); return documentName; } @@ -370,5 +370,4 @@ private void cleanUpIndex() fail("Failed to tidy index. " + e); } } - } diff --git a/tests/testcontainers-env/src/main/java/org/alfresco/tas/AlfrescoStackInitializer.java b/tests/testcontainers-env/src/main/java/org/alfresco/tas/AlfrescoStackInitializer.java index 0e00d01dcd..f77887535d 100644 --- a/tests/testcontainers-env/src/main/java/org/alfresco/tas/AlfrescoStackInitializer.java +++ b/tests/testcontainers-env/src/main/java/org/alfresco/tas/AlfrescoStackInitializer.java @@ -148,11 +148,21 @@ public void configureSecuritySettings(GenericContainer searchEngineContainer) * Run the alfresco-elasticsearch-reindexing container with path reindexing enabled. */ public static void reindexEverything() + { + reindex(Map.of("ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true", // Ensure path reindexing is enabled. + "ALFRESCO_REINDEX_JOB_NAME", "reindexByDate")); + } + + /** + * Run the alfresco-elasticsearch-reindexing container. + * + * @param envParam Any environment variables to override from the defaults. + */ + public static void reindex(Map envParam) { // Run the reindexing container. Map env = AlfrescoStackInitializer.getReindexEnvBasic(); - env.putAll(Map.of("ALFRESCO_REINDEX_PATHINDEXINGENABLED", "true", // Ensure path reindexing is enabled. - "ALFRESCO_REINDEX_JOB_NAME", "reindexByDate")); + env.putAll(envParam); try (GenericContainer reindexingComponent = new GenericContainer(getImagesConfig().getReIndexingImage()) .withEnv(env)