diff options
author | Hockla, Ali (ah999m) <ah999m@att.com> | 2020-01-13 14:11:46 -0600 |
---|---|---|
committer | Hockla, Ali (ah999m) <ah999m@att.com> | 2020-01-13 14:12:07 -0600 |
commit | 956a7b52188918f0f2d301a06bf0a2e31249168f (patch) | |
tree | 26c7afde6ce90c0508393074e640460d26483fa3 /feature-lifecycle | |
parent | 7c924cf4c75be8611a88e750b05ebeabda75e182 (diff) |
policy/drools-pdp jdk11 upgrades
Issue-ID: POLICY-1589
Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Diffstat (limited to 'feature-lifecycle')
5 files changed, 27 insertions, 32 deletions
diff --git a/feature-lifecycle/pom.xml b/feature-lifecycle/pom.xml index 66da4614..b57847a3 100644 --- a/feature-lifecycle/pom.xml +++ b/feature-lifecycle/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP ================================================================================ - Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -33,11 +33,6 @@ <name>feature-lifecycle</name> <description>Loadable module to support the lifecycle modes</description> - <properties> - <maven.compiler.source>1.8</maven.compiler.source> - <maven.compiler.target>1.8</maven.compiler.target> - </properties> - <build> <plugins> <plugin> @@ -116,7 +111,7 @@ <dependency> <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito</artifactId> + <artifactId>powermock-api-mockito2</artifactId> <scope>test</scope> </dependency> diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java index 2a258305..7fc7fd29 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java @@ -84,7 +84,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void start() { + public void testStart() { assertActive(); assertFalse(fsm.start()); assertActive(); @@ -101,7 +101,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void stop() { + public void testStop() { assertTrue(fsm.stop()); assertBasicTerminated(); @@ -116,7 +116,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void shutdown() { + public void testShutdown() { fsm.shutdown(); assertBasicTerminated(); @@ -126,7 +126,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void status() { + public void testStatus() { waitUntil(fsm.getStatusTimerSeconds() + 1, TimeUnit.SECONDS, isStatus(PdpState.ACTIVE)); int preCount = fsm.client.getSink().getRecentEvents().length; @@ -142,7 +142,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void stateChange() throws CoderException { + public void testStateChange() throws CoderException { assertActive(); /* no name and mismatching group info */ @@ -179,7 +179,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void update() throws IOException, CoderException { + public void testUpdate() throws IOException, CoderException { // TODO: extract repeated similar assertion blocks into their own helper methods diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java index f242e4c6..60d71d0c 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java @@ -71,7 +71,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void controller() { + public void testController() { fsm.start(controllerSupport.getController()); assertSame(controllerSupport.getController(), fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE, @@ -85,7 +85,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void start() { + public void testStart() { assertEquals(0, fsm.client.getSink().getRecentEvents().length); assertFalse(fsm.start()); assertBasicPassive(); @@ -110,7 +110,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void shutdown() throws Exception { + public void testShutdown() throws Exception { simpleStop(); fsm.shutdown(); @@ -118,7 +118,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void status() { + public void testStatus() { assertTrue(fsm.client.getSink().isAlive()); assertTrue(fsm.status()); assertSame(0, fsm.client.getSink().getRecentEvents().length); @@ -139,7 +139,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void update() throws IOException, CoderException { + public void testUpdate() throws IOException, CoderException { controllerSupport.getController().getDrools().delete(ToscaPolicy.class); assertEquals(0, controllerSupport.getController().getDrools().factCount("junits")); @@ -240,7 +240,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void stateChange() throws CoderException, IOException { + public void testStateChange() throws CoderException, IOException { /* no name */ PdpStateChange change = new PdpStateChange(); change.setPdpGroup("A"); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java index 353525d6..7c94e52c 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void constructor() { + public void testConstructor() { assertThatIllegalArgumentException().isThrownBy(() -> new LifecycleStateTerminated(null)); LifecycleState state = new LifecycleStateTerminated(new LifecycleFsm()); @@ -71,7 +71,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void stop() { + public void testStop() { assertEquals(PdpState.TERMINATED, fsm.state.state()); assertFalse(fsm.isAlive()); @@ -89,7 +89,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void bounce() { + public void testBounce() { assertBasicTerminated(); simpleStart(); simpleStop(); @@ -101,12 +101,12 @@ public class LifecycleStateTerminatedTest { @Test public void doubleBounce() { - bounce(); - bounce(); + testBounce(); + testBounce(); } @Test - public void doubleStartBounce() { + public void testDoubleStartBounce() { simpleStart(); assertFalse(fsm.start()); assertBasicPassive(); @@ -114,7 +114,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void shutdown() { + public void testShutdown() { assertBasicTerminated(); fsm.shutdown(); assertBasicTerminated(); @@ -123,7 +123,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void status() { + public void testStatus() { assertBasicTerminated(); assertFalse(fsm.status()); assertBasicTerminated(); @@ -136,7 +136,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void update() { + public void testUpdate() { PdpUpdate update = new PdpUpdate(); update.setName(NetworkUtil.getHostname()); update.setPdpGroup("A"); @@ -151,7 +151,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void stateChange() { + public void testStateChange() { PdpStateChange change = new PdpStateChange(); change.setPdpGroup("A"); change.setPdpSubgroup("a"); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java index da7435f3..37be4ac7 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ public class RestLifecycleManagerTest { } @Test - public void fsm() { + public void testFsm() { Response response = HttpClientFactoryInstance.getClientFactory().get("lifecycle").get("fsm"); assertNotNull(HttpClient.getBody(response, String.class)); assertEquals(Status.OK.getStatusCode(), response.getStatus()); |