aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-02-18 13:28:05 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-18 13:28:06 +0000
commit8ef504fa4b7117af1138d653106c9aa328d0522a (patch)
treea0901e1d741ab26aa4fc09544efb01b9eb972104 /adapters
parentdbd5bb99cd6a6c8a7465acb31468a07f2523f188 (diff)
parentdb87a79ae00c35499a61fd3d41122021cb9a9e25 (diff)
Merge "fix critical sonar bugs"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java2
-rw-r--r--adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/impl/SDNCRestClientTest.java10
2 files changed, 12 insertions, 0 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index 65c7d093a9..59884f25b8 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -6,6 +6,7 @@
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Modifications Copyright (C) 2018 IBM.
+ * Modifications Copyright (c) 2019 Samsung
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -90,6 +91,7 @@ public class SDNCRestClient{
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
+ Thread.currentThread().interrupt();
}
String action = bpelRequest.getRequestHeader().getSvcAction();
diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/impl/SDNCRestClientTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/impl/SDNCRestClientTest.java
index 076a9f3c6a..01fa3db960 100644
--- a/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/impl/SDNCRestClientTest.java
+++ b/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/impl/SDNCRestClientTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -30,6 +32,7 @@ import org.junit.Test;
import org.onap.so.adapters.sdnc.BaseTest;
import org.springframework.beans.factory.annotation.Autowired;
import static com.github.tomakehurst.wiremock.client.WireMock.*;
+import static org.junit.Assert.assertTrue;
public class SDNCRestClientTest extends BaseTest {
@@ -51,4 +54,11 @@ public class SDNCRestClientTest extends BaseTest {
SDNCResponse response = sdncClient.getSdncResp("", rt);
assertNotNull(response);
}
+
+ @Test
+ public void executeRequestInterrupted() {
+ Thread.currentThread().interrupt();
+ sdncClient.executeRequest(null);
+ assertTrue(Thread.interrupted());
+ }
}