diff options
author | sharath reddy <bs.reddy@huawei.com> | 2022-03-25 12:44:19 +0530 |
---|---|---|
committer | sharath reddy <bs.reddy@huawei.com> | 2022-03-25 13:19:08 +0530 |
commit | 2073da6514668ce17e7359900439354fb3432f4e (patch) | |
tree | 582571835a61daec0bceeaa7d65805c4e3cbb119 /profiles | |
parent | f439543779cf2dfac0b68443aea921c55983bf48 (diff) |
Fixed Sonar Bug and Code Smell Blockers
Issue-ID: CLI-439
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Change-Id: I81bd79661ab7c6b1152fa481d9273a86e77b4f3a
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/http/pom.xml | 6 | ||||
-rw-r--r-- | profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/profiles/http/pom.xml b/profiles/http/pom.xml index c830708d..2274bfc9 100644 --- a/profiles/http/pom.xml +++ b/profiles/http/pom.xml @@ -119,6 +119,12 @@ Excluded commons-codec vulnerable version and added invulnerable version <scope>test</scope> </dependency> <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.8.2</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.jmockit</groupId> <artifactId>jmockit</artifactId> <version>1.43</version> diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java index 68995dba..a3b4225d 100644 --- a/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java +++ b/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java @@ -37,6 +37,7 @@ import org.onap.cli.fw.http.connect.HttpInput; import org.onap.cli.fw.http.connect.HttpResult; import org.onap.cli.fw.http.connect.OnapHttpConnection; import org.onap.cli.fw.http.error.OnapCommandHttpFailure; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; public class OnapHttpConnectionTest { @@ -219,7 +220,7 @@ public class OnapHttpConnectionTest { public void httpUnSecuredCloseExceptionTest() throws IOException { inp.setMethod("other"); con = new OnapHttpConnection(); - con.close(); + assertDoesNotThrow(() -> con.close()); } @Test |