diff options
Diffstat (limited to 'aai-resources')
5 files changed, 16 insertions, 6 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 @@ <parent> <groupId>org.onap.aai.resources</groupId> <artifactId>resources</artifactId> - <version>1.13.1-SNAPSHOT</version> + <version>1.13.3</version> </parent> <properties> <java.version>1.8</java.version> 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<DBRequest> requests = new ArrayList<>(); - requests.add(request); - if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) { + List<DBRequest> 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<String, String> removeNonFilterableParams(MultivaluedMap<String, String> params) { String[] toRemove = @@ -554,7 +557,7 @@ public class LegacyMoxyConsumer extends RESTAPI { .build(); List<DBRequest> 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 @@ <logger name="org.zookeeper" level="OFF" /> - <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <logger name="org.onap.aai" level="INFO" additivity="false"> <appender-ref ref="asyncDEBUG" /> <appender-ref ref="asyncSANE" /> <appender-ref ref="STDOUT" /> </logger> + <logger name="org.onap.aai.dbgen" level="WARN" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> <logger name="org.onap.aai.aailog.logs.AaiScheduledTaskAuditLog" level="INFO"> <appender-ref ref="asyncAUDIT"/> </logger> |