Skip to content

Feature/acs 11601 user mapping reliability tests - #1422

Open
kushal-banik-hyland wants to merge 29 commits into
feature/ACS-11592-reliability-testsfrom
feature/ACS-11601-User-mapping-reliability-tests
Open

Feature/acs 11601 user mapping reliability tests#1422
kushal-banik-hyland wants to merge 29 commits into
feature/ACS-11592-reliability-testsfrom
feature/ACS-11601-User-mapping-reliability-tests

Conversation

@kushal-banik-hyland

@kushal-banik-hyland kushal-banik-hyland commented Jun 8, 2026

Copy link
Copy Markdown

This pull request introduces a new abstract base class for Nucleus Sync reliability integration tests, adds a utility method for creating a Nucleus Sync container with appropriate environment variables for WireMock-based tests. These changes collectively improve test coverage, reliability, and maintainability for Nucleus Sync integration scenarios.

Enhancements for Nucleus Sync integration testing:

  • Added a new abstract base test class BaseNucleusSyncReliabilityIT that provides reusable setup, stubbing, and utility methods for Nucleus Sync reliability tests. This includes methods for stubbing Nucleus IAM endpoints, generating users, and extracting mapped user IDs from requests.
  • Introduced a utility method createNucleusSyncContainerForWireMock in DockerContainers.java to simplify and standardize the setup of Nucleus Sync containers in WireMock-based test environments, ensuring correct environment variable configuration.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMD found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@kushal-banik-hyland
kushal-banik-hyland force-pushed the feature/ACS-11601-User-mapping-reliability-tests branch from 8fd01fc to 0347b5e Compare June 8, 2026 13:30
@jakubkochman
jakubkochman force-pushed the feature/ACS-11592-reliability-tests branch from ff78343 to a58358a Compare June 8, 2026 13:39
@kushal-banik-hyland
kushal-banik-hyland force-pushed the feature/ACS-11601-User-mapping-reliability-tests branch 2 times, most recently from ab2a5a7 to ce407a3 Compare June 8, 2026 14:15
@kushal-banik-hyland
kushal-banik-hyland force-pushed the feature/ACS-11601-User-mapping-reliability-tests branch from ce407a3 to e0991b7 Compare June 11, 2026 10:25
@kushal-banik-hyland
kushal-banik-hyland marked this pull request as ready for review June 11, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Nucleus Sync test harness and introduces a set of reliability/performance E2E tests for user/group/member mapping scenarios under outages/latency, while also refactoring the Nucleus/Alfresco clients to use a shared retryable HTTP invoker and emit Micrometer counters.

Changes:

  • Added a reusable Nucleus Sync reliability testing base (plus large-scale ingestion base) and a new dedicated Failsafe profile to run these tests separately.
  • Introduced RetryableHttpInvoker + client-side failure metrics and updated AlfrescoClient/NucleusClient to use them.
  • Extended the reliability Testcontainers environment with a Nucleus WireMock + Toxiproxy listener and a Nucleus Sync container wiring helper.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
nucleus-sync/src/main/resources/application.yml Exposes actuator metrics and defines retry/auth/env wiring for nucleus-sync.
nucleus-sync/src/main/java/org/alfresco/hxi_connector/nucleus_sync/model/UserMapping.java Updates copyright year.
nucleus-sync/src/main/java/org/alfresco/hxi_connector/nucleus_sync/client/RetryableHttpInvoker.java New shared retryable WebClient invoker used by sync clients.
nucleus-sync/src/main/java/org/alfresco/hxi_connector/nucleus_sync/client/NucleusSyncMetrices.java New metrics name/tag constants for client failure counters.
nucleus-sync/src/main/java/org/alfresco/hxi_connector/nucleus_sync/client/NucleusClient.java Refactors Nucleus client to use RetryableHttpInvoker + counters.
nucleus-sync/src/main/java/org/alfresco/hxi_connector/nucleus_sync/client/ClientErrorClassifier.java New error classifier for metrics tagging.
nucleus-sync/src/main/java/org/alfresco/hxi_connector/nucleus_sync/client/AlfrescoClient.java Refactors Alfresco client to use RetryableHttpInvoker + counters.
nucleus-sync/src/integration-test/java/org/alfresco/hxi_connector/nucleus_sync/client/NucleusClientIntegrationTest.java Updates integration test wiring for new dependencies.
nucleus-sync/src/integration-test/java/org/alfresco/hxi_connector/nucleus_sync/client/AlfrescoClientIntegrationTest.java Updates integration test wiring and expected error message.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/util/client/RepositoryClient.java Adds email to user creation payload; updates ADMIN_USER.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/util/client/NucleusSyncClient.java New HTTP client for triggering /sync/trigger in E2E tests.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/util/client/model/User.java Extends test User record to include email.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/user_mapping/UserMappingDuringNucleusOutageTolerableReliabilityIT.java Adds “tolerable outage” scenario for user-mapping phase.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/user_mapping/UserMappingDuringNucleusOutageNonTolerableReliabilityIT.java Adds “non-tolerable outage” scenario for user-mapping phase.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/user_mapping/LargeScaleUserMappingReliabilityIT.java Adds large-scale user-mapping correctness scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/SyncIdempotencyReliabilityIT.java Adds idempotency contract test (no duplicate mutations on replay).
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/performance/UserMappingThroughputReliabilityIT.java Adds throughput sampling/threshold test for mapping requests.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/performance/MemoryManagementTestReliabilityIT.java Adds heap usage sampling test via actuator metrics.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/performance/CpuManagementTestReliabilityIT.java Adds JVM/system CPU sampling and thresholds via actuator metrics.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/NucleusSyncE2eTest.java Fixes package location for Nucleus Sync E2E test.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/member_mapping/LargeScaleGroupMemberMappingReliabilityIT.java Adds large-scale group-member mapping correctness scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/member_mapping/GroupMembersMappingTolerableReliabilityIT.java Adds “tolerable outage” scenario for group-members phase.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/member_mapping/GroupMembersMappingNonTolerableReliabilityIT.java Adds “non-tolerable outage” scenario for group-members phase.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/group_mapping/LargeScaleGroupMappingReliabilityIT.java Adds large-scale group mapping correctness scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/group_mapping/GroupMappingDuringNucleusOutageTolerableReliabilityIT.java Adds “tolerable outage” scenario for group creation phase.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/group_mapping/GroupMappingDuringNucleusOutageNonTolerableReliabilityIT.java Adds “non-tolerable outage” scenario for group creation phase.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/NucleusTokenEndpointFailureReliabilityIT.java Adds token endpoint outage scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/NucleusShortPartitionReliabilityIT.java Adds short Nucleus partition (tolerable) scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/NucleusNonTolerablePartitionReliabilityIT.java Adds long Nucleus partition (non-tolerable) scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/NucleusLatencyJitterReliabilityIT.java Adds Nucleus latency/jitter scenarios and cleanup.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/AlfrescoShortPartitionReliabilityIT.java Adds short ACS partition (tolerable) scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/AlfrescoRestartReliabilityIT.java Adds ACS restart resilience test using process chaos base.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/AlfrescoNonTolerablePartitionReliabilityIT.java Adds long ACS partition (non-tolerable) scenario.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/dependency_harness/AlfrescoLatencyJitterReliabilityIT.java Adds ACS latency/jitter scenarios.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/BaseNucleusSyncReliabilityIT.java New reusable base for Nucleus Sync reliability tests.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/nucleus_sync/BaseNucleusSyncLargeIngestionIT.java New base for large-scale stubbed ACS/Nucleus ingestion tests.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/WiremockCounts.java Adds WireMock counters for Nucleus sync endpoints.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/ToxiproxyListeners.java Adds Nucleus proxy listener support.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/ReliabilityEnvironmentSpec.java Adds withStubbedAcsEnabled toggle to env spec.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/ReliabilityEnvironment.java Adds Nucleus mock + Nucleus Sync container + proxy wiring and clients.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/NetworkTopology.java Adds Nucleus aliases/ports and toxiproxy alias.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/ContainerComposition.java Boots Nucleus mock + Nucleus Sync; routes via toxiproxy; adds stubbed-ACS option.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/reliability/harness/BaseReliabilityIT.java Resets Nucleus mock + proxy between tests.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/QuestionsPermissionsE2eTest.java Updates user model usage to include email.
e2e-test/src/test/java/org/alfresco/hxi_connector/e2e_test/QuestionsPermissionsAGSE2eTest.java Updates user model usage to include email.
e2e-test/pom.xml Splits nucleus-sync reliability suite into its own Maven profile/job.
common-test/src/main/java/org/alfresco/hxi_connector/common/test/docker/util/DockerContainers.java Adds createNucleusSyncContainerForWireMock helper.
.secrets.baseline Updates generated timestamp.
.mvn/wrapper/maven-wrapper.properties Adds Maven wrapper configuration.
.github/workflows/ci.yml Adds a dedicated CI job for Nucleus Sync E2E tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 53 to 58
@@ -59,6 +57,8 @@ public class AlfrescoClient
private final int timeoutInMins;
private final int pageSize;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants