logger.warn("The hostname for SDC activities deployment is not configured in SO");
             return;
         }
-        if (!checkHttpOk(hostname)) {
+        if (!checkHttpServerUp(hostname)) {
             logger.warn("The sdc end point is not alive");
             return;
         }
         return;
     }
 
-    public boolean checkHttpOk(String host) {
+    public boolean checkHttpServerUp(String host) {
         URL url = null;
-        boolean isOk = false;
+        boolean isUp = false;
 
         int responseCode = 0;
         try {
             url = new URL(host);
             HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+            connection.setConnectTimeout(5000);
             responseCode = connection.getResponseCode();
         } catch (Exception e) {
             logger.warn("Exception on connecting to SDC WFD endpoint: " + e.getMessage());
         }
-        if (responseCode == HttpStatus.SC_OK) {
-            isOk = true;
+        if (responseCode == HttpStatus.SC_OK || responseCode == HttpStatus.SC_NOT_FOUND) {
+            isUp = true;
         }
-        return isOk;
+        return isUp;
     }
 }
 
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.when;
 import org.junit.Test;
+import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Spy;
 import org.onap.so.asdc.BaseTest;
 import org.onap.so.asdc.activity.DeployActivitySpecs;
 import org.onap.so.asdc.activity.beans.ActivitySpecCreateResponse;
     @Autowired
     private DeployActivitySpecs deployActivitySpecs;
 
+    @InjectMocks
+    @Spy
+    DeployActivitySpecs deployActivitySpecsM;
+
     @Test
     public void deployActivitySpecsIT_Test() throws Exception {
         ActivitySpecCreateResponse activitySpecCreateResponse = new ActivitySpecCreateResponse();
                 put(urlPathMatching(urlPath)).willReturn(aResponse().withHeader("Content-Type", "application/json")
                         .withStatus(org.springframework.http.HttpStatus.OK.value())));
 
-        deployActivitySpecs.deployActivities();
+        String host = "http://localhost:8090";
+        when(deployActivitySpecsM.checkHttpServerUp(host)).thenReturn(false);
+        deployActivitySpecsM.deployActivities();
         verify(0, putRequestedFor(urlEqualTo(urlPath)));
     }
 
 
                 new ArrayList<org.onap.so.db.catalog.beans.ActivitySpec>();
         catalogActivitySpecList.add(catalogActivitySpec);
         when(env.getProperty("mso.asdc.config.activity.endpoint")).thenReturn("http://testEndpoint");
-        doReturn(true).when(deployActivitySpecs).checkHttpOk("http://testEndpoint");
+        doReturn(true).when(deployActivitySpecs).checkHttpServerUp("http://testEndpoint");
         when(activitySpecRepository.findAll()).thenReturn(catalogActivitySpecList);
         doReturn("testActivityId").when(activitySpecsActions).createActivitySpec(Mockito.any(), Mockito.any());
         doReturn(true).when(activitySpecsActions).certifyActivitySpec(Mockito.any(), Mockito.any());