From 725665cc9fe106425c4a329d5bdff1fbb63ef0e8 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Wed, 1 Mar 2023 13:02:05 +0100 Subject: [PATCH] Minor changes Made callback URL in PUT job optional. Stepped springboot version. Signed-off-by: PatrikBuhr Issue-ID: NONRTRIC-841 Change-Id: Ib4ba10024a75d31155c6b40fa6f93ef338c6adc1 --- pom.xml | 4 ++-- .../ics/controllers/r1consumer/ConsumerJobInfo.java | 2 +- .../java/org/oransc/ics/MockInformationService.java | 19 ++++++++++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index f7daeee..3568ce4 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.2 + 3.0.3 org.o-ran-sc.nonrtric.plt @@ -339,4 +339,4 @@ JIRA https://jira.o-ran-sc.org/ - \ No newline at end of file + diff --git a/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java b/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java index 4495530..62483d0 100644 --- a/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java +++ b/src/main/java/org/oransc/ics/controllers/r1consumer/ConsumerJobInfo.java @@ -50,7 +50,7 @@ public class ConsumerJobInfo { @Schema(name = "job_result_uri", description = "The target URI of the subscribed information", required = true) @SerializedName("job_result_uri") - @JsonProperty(value = "job_result_uri", required = true) + @JsonProperty(value = "job_result_uri", required = false) public String jobResultUri = ""; @Schema( diff --git a/src/test/java/org/oransc/ics/MockInformationService.java b/src/test/java/org/oransc/ics/MockInformationService.java index caff3e2..a2ce52b 100644 --- a/src/test/java/org/oransc/ics/MockInformationService.java +++ b/src/test/java/org/oransc/ics/MockInformationService.java @@ -21,8 +21,11 @@ package org.oransc.ics; import org.junit.jupiter.api.Test; +import org.oransc.ics.repository.InfoJobs; +import org.oransc.ics.repository.InfoTypes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.web.server.LocalServerPort; @@ -42,12 +45,26 @@ class MockInformationService { @LocalServerPort private int port; + @Autowired + InfoTypes infoTypes; + + @Autowired + InfoJobs infoJobs; + @Test @SuppressWarnings("squid:S2699") void runMock() throws Exception { logger.warn("**************** Keeping server alive! " + this.port); synchronized (this) { - this.wait(); + while (true) { + System.out.println("**** Types *** "); + this.infoTypes.getAllInfoTypes().forEach(type -> System.out.println(" " + type.getId())); + System.out.println("**** Jobs *** "); + this.infoJobs.getJobs() + .forEach(job -> System.out.println(" id: " + job.getId() + ", type:" + job.getType().getId())); + Thread.sleep(1000 * 60); + + } } } } -- 2.16.6