From 2ee4fd4b1c4436f2f295bc6f2eb566cdf0200464 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Mon, 5 Feb 2024 17:29:33 +0100 Subject: Update aai-common to 1.13.3 in resources - update to 1.13.3 that contains fix for TraversalURIOptimizedQuery building - disable tracing in tests - disable log lines for schema generation in tests Issue-ID: AAI-3761 Change-Id: Ifbe1a4ca716e73c1722c1368dc55719b23fe101a Signed-off-by: Fiete Ostkamp --- aai-resources/pom.xml | 2 +- .../src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java | 11 +++++++---- aai-resources/src/main/resources/application.properties | 2 ++ aai-resources/src/test/resources/application-test.properties | 2 ++ aai-resources/src/test/resources/logback.xml | 5 ++++- pom.xml | 6 +++--- version.properties | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml index 8bc71c7..33828e4 100644 --- a/aai-resources/pom.xml +++ b/aai-resources/pom.xml @@ -28,7 +28,7 @@ org.onap.aai.resources resources - 1.13.1-SNAPSHOT + 1.13.3 1.8 diff --git a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java index c685071..4912a00 100644 --- a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java +++ b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java @@ -290,9 +290,8 @@ public class LegacyMoxyConsumer extends RESTAPI { Introspector obj = loader.introspectorFromName(objType); DBRequest request = new DBRequest.Builder(HttpMethod.GET, uriObject, uriQuery, obj, headers, info, transId).build(); - List requests = new ArrayList<>(); - requests.add(request); - if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) { + List requests = Collections.singletonList(request); + if (hasValidPaginationParams(resultIndex, resultSize)) { traversalUriHttpEntry.setPaginationIndex(Integer.parseInt(resultIndex)); traversalUriHttpEntry.setPaginationBucket(Integer.parseInt(resultSize)); } @@ -320,6 +319,10 @@ public class LegacyMoxyConsumer extends RESTAPI { return response; } + private boolean hasValidPaginationParams(String resultIndex, String resultSize) { + return resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize); + } + private MultivaluedMap removeNonFilterableParams(MultivaluedMap params) { String[] toRemove = @@ -554,7 +557,7 @@ public class LegacyMoxyConsumer extends RESTAPI { .build(); List requests = new ArrayList<>(); requests.add(request); - if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) { + if (hasValidPaginationParams(resultIndex, resultSize)) { traversalUriHttpEntry.setPaginationIndex(Integer.parseInt(resultIndex)); traversalUriHttpEntry.setPaginationBucket(Integer.parseInt(resultSize)); } diff --git a/aai-resources/src/main/resources/application.properties b/aai-resources/src/main/resources/application.properties index 094c81c..0389406 100644 --- a/aai-resources/src/main/resources/application.properties +++ b/aai-resources/src/main/resources/application.properties @@ -7,6 +7,8 @@ info.build.version=1.1.0 spring.application.name=aai-resources spring.jersey.type=filter spring.main.allow-bean-definition-overriding=true + +spring.sleuth.enabled=true spring.zipkin.baseUrl=http://jaeger-collector.istio-system:9411 spring.sleuth.messaging.jms.enabled = false spring.sleuth.trace-id128=true diff --git a/aai-resources/src/test/resources/application-test.properties b/aai-resources/src/test/resources/application-test.properties index cdc528f..596bd23 100644 --- a/aai-resources/src/test/resources/application-test.properties +++ b/aai-resources/src/test/resources/application-test.properties @@ -11,6 +11,8 @@ server.servlet.context-path=/ spring.jersey.application-path=${schema.uri.base.path} +spring.sleuth.enabled=false + spring.autoconfigure.exclude=\ org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\ diff --git a/aai-resources/src/test/resources/logback.xml b/aai-resources/src/test/resources/logback.xml index 4504bce..8bb9e7c 100644 --- a/aai-resources/src/test/resources/logback.xml +++ b/aai-resources/src/test/resources/logback.xml @@ -223,11 +223,14 @@ - + + + + diff --git a/pom.xml b/pom.xml index 7f21bc9..06f08e8 100644 --- a/pom.xml +++ b/pom.xml @@ -26,11 +26,11 @@ org.onap.aai.aai-common aai-parent - 1.13.0 + 1.13.3 org.onap.aai.resources resources - 1.13.1-SNAPSHOT + 1.13.3 aai-resources pom @@ -48,7 +48,7 @@ /content/repositories/staging/ ${project.version} - 1.13.1 + 1.13.3 1.12.3 diff --git a/version.properties b/version.properties index 0c0fa8e..20248c5 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ major_version=1 minor_version=13 -patch_version=1 +patch_version=2 base_version=${major_version}.${minor_version}.${patch_version} -- cgit 1.2.3-korg