From 6171e3a70659706b67e6049a9d11fc43dd10f354 Mon Sep 17 00:00:00 2001 From: Marvin Lindner Date: Mon, 6 Jul 2026 14:22:45 +0200 Subject: [PATCH 1/5] adapt root pom and update version to 0.0.2-alpha --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5dadf74..99c7125 100644 --- a/pom.xml +++ b/pom.xml @@ -58,20 +58,20 @@ - 0.0.1-alpha + 0.0.2-alpha **/Mock*.java - 17 + 21 - 4.9.0 + 5.0.0 1.19.0 - 3.4.5 + 4.1.0 0.8.15 From 0070c07d16228495d6dd3b8d22a8ee4bf7fdb231 Mon Sep 17 00:00:00 2001 From: Marvin Lindner Date: Mon, 6 Jul 2026 14:22:57 +0200 Subject: [PATCH 2/5] adapt itests to new spring structure --- integration-tests/mtx-local/srv/pom.xml | 6 ++++++ .../sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java | 2 +- .../feature/aicore/itest/mt/SubscribeUnsubscribeTest.java | 2 +- .../cds/feature/aicore/itest/mt/TenantIsolationTest.java | 2 +- integration-tests/spring/pom.xml | 6 ++++++ .../sap/cds/feature/aicore/itest/BaseIntegrationTest.java | 2 +- 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/integration-tests/mtx-local/srv/pom.xml b/integration-tests/mtx-local/srv/pom.xml index a4af600..2ee1530 100644 --- a/integration-tests/mtx-local/srv/pom.xml +++ b/integration-tests/mtx-local/srv/pom.xml @@ -63,6 +63,12 @@ test + + org.springframework.boot + spring-boot-starter-webmvc-test + test + + org.springframework.security spring-security-test diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java index 30e5a4d..18e9b7b 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java @@ -16,7 +16,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java index 185d387..cbb1a95 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java @@ -18,7 +18,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java index d30830f..6e89c75 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; diff --git a/integration-tests/spring/pom.xml b/integration-tests/spring/pom.xml index 1843703..53d8a94 100644 --- a/integration-tests/spring/pom.xml +++ b/integration-tests/spring/pom.xml @@ -56,6 +56,12 @@ test + + org.springframework.boot + spring-boot-starter-webmvc-test + test + + org.springframework.security spring-security-test diff --git a/integration-tests/spring/src/test/java/com/sap/cds/feature/aicore/itest/BaseIntegrationTest.java b/integration-tests/spring/src/test/java/com/sap/cds/feature/aicore/itest/BaseIntegrationTest.java index ea356aa..19a1372 100644 --- a/integration-tests/spring/src/test/java/com/sap/cds/feature/aicore/itest/BaseIntegrationTest.java +++ b/integration-tests/spring/src/test/java/com/sap/cds/feature/aicore/itest/BaseIntegrationTest.java @@ -22,7 +22,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.web.servlet.MockMvc; From 2034c2421c78ef9c9f9aa1647671be0cc214ff18 Mon Sep 17 00:00:00 2001 From: Marvin Lindner Date: Mon, 6 Jul 2026 14:23:03 +0200 Subject: [PATCH 3/5] update sample --- samples/bookshop/pom.xml | 6 +++--- samples/bookshop/srv/pom.xml | 6 ++++++ .../src/test/java/customer/bookshop/ApplicationTest.java | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/samples/bookshop/pom.xml b/samples/bookshop/pom.xml index 426758b..fcaa8f3 100644 --- a/samples/bookshop/pom.xml +++ b/samples/bookshop/pom.xml @@ -18,9 +18,9 @@ 1.0.0-SNAPSHOT - 17 - 4.9.0 - 3.5.6 + 21 + 5.0.0 + 4.1.0 0.0.1-alpha diff --git a/samples/bookshop/srv/pom.xml b/samples/bookshop/srv/pom.xml index 599800e..d7c2fb6 100644 --- a/samples/bookshop/srv/pom.xml +++ b/samples/bookshop/srv/pom.xml @@ -33,6 +33,12 @@ test + + org.springframework.boot + spring-boot-starter-webmvc-test + test + + com.sap.cds cds-adapter-odata-v4 diff --git a/samples/bookshop/srv/src/test/java/customer/bookshop/ApplicationTest.java b/samples/bookshop/srv/src/test/java/customer/bookshop/ApplicationTest.java index 9672588..510bdeb 100644 --- a/samples/bookshop/srv/src/test/java/customer/bookshop/ApplicationTest.java +++ b/samples/bookshop/srv/src/test/java/customer/bookshop/ApplicationTest.java @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationContext; From 27799d17b34c0befd9b8b83cde3820c185e0b2cd Mon Sep 17 00:00:00 2001 From: Marvin Lindner Date: Mon, 6 Jul 2026 17:01:18 +0200 Subject: [PATCH 4/5] update pipeline to run with new min version --- .github/actions/scan-with-sonar/action.yml | 2 +- .github/workflows/pipeline.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/scan-with-sonar/action.yml b/.github/actions/scan-with-sonar/action.yml index 9201134..1b7a12e 100644 --- a/.github/actions/scan-with-sonar/action.yml +++ b/.github/actions/scan-with-sonar/action.yml @@ -80,7 +80,7 @@ runs: -Dsonar.projectKey=com.sap.cds.cds-ai -Dsonar.projectVersion=${{ steps.get-revision.outputs.REVISION }} -Dsonar.qualitygate.wait=true - -Dsonar.java.source=17 + -Dsonar.java.source=21 -Dsonar.exclusions=**/samples/**,**/integration-tests/** -Dsonar.coverage.jacoco.xmlReportPaths=${{ github.workspace }}/cds-feature-ai-core/target/site/jacoco/jacoco.xml,${{ github.workspace }}/cds-feature-recommendations/target/site/jacoco/jacoco.xml,${{ github.workspace }}/integration-tests/spring/target/site/jacoco/jacoco.xml,${{ github.workspace }}/coverage-report/target/site/jacoco-aggregate/jacoco.xml -Dsonar.coverage.exclusions=**/src/test/**,**/src/gen/** diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2671fb0..44b8ac6 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - java-version: [17, 21] + java-version: [21, 25] steps: - name: Checkout uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - java-version: [17, 21] + java-version: [21, 25] steps: - name: Checkout uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 @@ -74,7 +74,7 @@ jobs: strategy: fail-fast: false matrix: - java-version: [17, 21] + java-version: [21, 25] steps: - name: Checkout uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 @@ -119,7 +119,7 @@ jobs: continue-on-error: true uses: ./.github/actions/scan-with-sonar with: - java-version: '17' + java-version: '21' maven-version: ${{ env.MAVEN_VERSION }} sonarq-token: ${{ secrets.SONARQ_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }} @@ -144,7 +144,7 @@ jobs: - name: CodeQL Analysis uses: cap-java/.github/actions/scan-with-codeql@296573b55e906f5c77a1855bcfe4285cbbc5cac4 # main with: - java-version: '17' + java-version: '21' maven-version: ${{ env.MAVEN_VERSION }} language: ${{ matrix.language }} queries: security-extended From 05ee9d9c4def318c3658c1f8821a294335cd7fea Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 7 Jul 2026 10:50:00 +0200 Subject: [PATCH 5/5] Change ObjectMapper from being autowired to created for the SubscriptionEndpointMapper --- .../sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java | 4 +--- .../feature/aicore/itest/mt/SubscribeUnsubscribeTest.java | 4 +--- .../sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java | 4 +--- .../aicore/itest/mt/utils/SubscriptionEndpointClient.java | 5 ++--- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java index 18e9b7b..c119fff 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/MtxLifecycleTest.java @@ -6,7 +6,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; -import com.fasterxml.jackson.databind.ObjectMapper; import com.sap.cds.feature.aicore.generated.cds4j.aicore.AICore_; import com.sap.cds.feature.aicore.api.ResourceGroupContext; import com.sap.cds.feature.aicore.itest.mt.utils.SubscriptionEndpointClient; @@ -30,14 +29,13 @@ class MtxLifecycleTest { private static final String TENANT = "tenant-3"; @Autowired MockMvc client; - @Autowired ObjectMapper objectMapper; @Autowired CdsRuntime runtime; SubscriptionEndpointClient subscriptionEndpointClient; @BeforeEach void setup() { - subscriptionEndpointClient = new SubscriptionEndpointClient(objectMapper, client); + subscriptionEndpointClient = new SubscriptionEndpointClient(client); } @AfterEach diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java index cbb1a95..fe21365 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/SubscribeUnsubscribeTest.java @@ -8,7 +8,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import com.fasterxml.jackson.databind.ObjectMapper; import com.sap.cds.feature.aicore.generated.cds4j.aicore.AICore_; import com.sap.cds.feature.aicore.api.ResourceGroupContext; import com.sap.cds.feature.aicore.itest.mt.utils.SubscriptionEndpointClient; @@ -31,14 +30,13 @@ class SubscribeUnsubscribeTest { private static final String PRODUCTS_URL = "/odata/v4/MtTestService/Products"; @Autowired MockMvc client; - @Autowired ObjectMapper objectMapper; @Autowired CdsRuntime runtime; SubscriptionEndpointClient subscriptionEndpointClient; @BeforeEach void setup() { - subscriptionEndpointClient = new SubscriptionEndpointClient(objectMapper, client); + subscriptionEndpointClient = new SubscriptionEndpointClient(client); } @Test diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java index 6e89c75..e90158f 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/TenantIsolationTest.java @@ -5,7 +5,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.fasterxml.jackson.databind.ObjectMapper; import com.sap.cds.feature.aicore.generated.cds4j.aicore.AICore_; import com.sap.cds.feature.aicore.api.ResourceGroupContext; import com.sap.cds.feature.aicore.core.AICoreConfig; @@ -28,14 +27,13 @@ class TenantIsolationTest { @Autowired MockMvc client; - @Autowired ObjectMapper objectMapper; @Autowired CdsRuntime runtime; SubscriptionEndpointClient subscriptionEndpointClient; @BeforeEach void setup() { - subscriptionEndpointClient = new SubscriptionEndpointClient(objectMapper, client); + subscriptionEndpointClient = new SubscriptionEndpointClient(client); } @Test diff --git a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/utils/SubscriptionEndpointClient.java b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/utils/SubscriptionEndpointClient.java index d87d599..2d08235 100644 --- a/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/utils/SubscriptionEndpointClient.java +++ b/integration-tests/mtx-local/srv/src/test/java/com/sap/cds/feature/aicore/itest/mt/utils/SubscriptionEndpointClient.java @@ -18,13 +18,12 @@ public class SubscriptionEndpointClient { private static final String MT_SUBSCRIPTIONS_TENANTS = "/mt/v1.0/subscriptions/tenants/"; - private final ObjectMapper objectMapper; + private final ObjectMapper objectMapper = new ObjectMapper(); private final MockMvc client; private final String credentials = "Basic " + Base64.getEncoder().encodeToString("privileged:".getBytes(StandardCharsets.UTF_8)); - public SubscriptionEndpointClient(ObjectMapper objectMapper, MockMvc client) { - this.objectMapper = objectMapper; + public SubscriptionEndpointClient(MockMvc client) { this.client = client; }