From 6fb8dfad11c84c0833e842183ec43a4ee95e81de Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 14 Jul 2020 08:55:33 -0400 Subject: Update adaptors to sodium Update sli/adaptors to OpenDaylight Sodium release. 2 changes were needed: - mdsal-resource : needed to add unimplemented abstract methods in inner anonymous BundleContext class in test case. - resource-assignment: needed to correct unit test problems that were ignored in earlier versions of h2 Change-Id: Ice63bfce64768e46c4376db55e3e9e97d0b934ad Issue-ID: CCSDK-2551 Signed-off-by: Dan Timoney --- .../java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java | 8 ++++++++ resource-assignment/provider/src/test/resources/sql/schema.sql | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'resource-assignment') diff --git a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java index ab2d936c..dbf0c4aa 100644 --- a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java +++ b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java @@ -216,6 +216,7 @@ public class TestReserve { rr.requestType = "New"; rr.rangeMaxOverride = -1; rr.rangeMinOverride = -1; + rr.applicationId = "myapp"; List rsList = new ArrayList<>(); @@ -513,6 +514,7 @@ public class TestReserve { rr.endPointPosition = "VPE-Cust"; rr.rangeMaxOverride = -1; rr.rangeMinOverride = -1; + rr.applicationId = "myapp"; List rsList = new ArrayList<>(); resourceAllocator.reserve(sd, rt, rr, rsList); @@ -533,6 +535,7 @@ public class TestReserve { rr.endPointPosition = "VPE-Core1"; rr.rangeMaxOverride = -1; rr.rangeMinOverride = -1; + rr.applicationId = "myapp"; rsList = new ArrayList<>(); resourceAllocator.reserve(sd, rt, rr, rsList); @@ -553,6 +556,7 @@ public class TestReserve { rr.endPointPosition = "VPE-Core2"; rr.rangeMaxOverride = -1; rr.rangeMinOverride = -1; + rr.applicationId = "myapp"; rsList = new ArrayList<>(); resourceAllocator.reserve(sd, rt, rr, rsList); @@ -573,6 +577,7 @@ public class TestReserve { rr.endPointPosition = "VPE-Core3"; rr.rangeMaxOverride = -1; rr.rangeMinOverride = -1; + rr.applicationId = "myapp"; rsList = new ArrayList<>(); resourceAllocator.reserve(sd, rt, rr, rsList); @@ -720,6 +725,7 @@ public class TestReserve { rr.rangeMaxOverride = 3901; rr.rangeMinOverride = 3900; rr.resourceType = ResourceType.Range; + rr.applicationId = "myapp"; List rsList = new ArrayList<>(); resourceAllocator.reserve(sd, rt, rr, rsList); @@ -748,6 +754,7 @@ public class TestReserve { rr.rangeMinOverride = -1; rr.rangeOverrideList = Arrays.asList(range); rr.resourceType = ResourceType.Range; + rr.applicationId = "myapp"; rsList = new ArrayList<>(); resourceAllocator.reserve(sd, rt, rr, rsList); @@ -781,6 +788,7 @@ public class TestReserve { rr.rangeOverrideList = new ArrayList<>(); rr.rangeOverrideList.add(range1); rr.rangeOverrideList.add(range2); + rr.applicationId = "myapp"; rr.resourceType = ResourceType.Range; rsList = new ArrayList<>(); diff --git a/resource-assignment/provider/src/test/resources/sql/schema.sql b/resource-assignment/provider/src/test/resources/sql/schema.sql index ed123ddd..275337e4 100644 --- a/resource-assignment/provider/src/test/resources/sql/schema.sql +++ b/resource-assignment/provider/src/test/resources/sql/schema.sql @@ -124,7 +124,7 @@ CREATE TABLE SERVICE_RESOURCE ( service_status VARCHAR(10) NOT NULL, service_change_number SMALLINT NOT NULL, resource_set_id VARCHAR(100) NOT NULL, - resource_union_id VARCHAR(100) NOT NULL, + resource_union_id VARCHAR(100) NOT NULL ); ALTER TABLE SERVICE_RESOURCE ADD CONSTRAINT C1_SERVICE_RESOURCE CHECK (service_status IN ('Active', 'Pending')); -- cgit 1.2.3-korg