diff --git a/source/src/main/java/org/cerberus/core/engine/execution/impl/RunTestCaseService.java b/source/src/main/java/org/cerberus/core/engine/execution/impl/RunTestCaseService.java index 53f1cdda8c..1e3eb399e7 100644 --- a/source/src/main/java/org/cerberus/core/engine/execution/impl/RunTestCaseService.java +++ b/source/src/main/java/org/cerberus/core/engine/execution/impl/RunTestCaseService.java @@ -56,7 +56,7 @@ public TestCaseExecution runTestCase(TestCaseExecution execution) { try { LOG.debug("Start Execution " + "ID={}", execution.getId()); execution = executionStartService.startExecution(execution); - LOG.info("Execution Started : UUID={} ID= {}", execution.getExecutionUUID(), " ID=" + execution.getId()); + LOG.info("Execution Started : UUID={} ID= {}", execution.getExecutionUUID(), execution.getId()); } catch (CerberusException ex) { execution.setResultMessage(ex.getMessageError()); diff --git a/source/src/main/java/org/cerberus/core/engine/scheduledtasks/ScheduledTaskRunner.java b/source/src/main/java/org/cerberus/core/engine/scheduledtasks/ScheduledTaskRunner.java index ecf447b4d4..9d47ac3f16 100644 --- a/source/src/main/java/org/cerberus/core/engine/scheduledtasks/ScheduledTaskRunner.java +++ b/source/src/main/java/org/cerberus/core/engine/scheduledtasks/ScheduledTaskRunner.java @@ -81,7 +81,7 @@ public void nextStep() { b3TickNumber++; } else { b3TickNumber = 1; - // We trigger the Queue Processing job. + // We trigger the Scheduler init job. performBatch3_SchedulerInit(); } @@ -114,9 +114,9 @@ private void performBatch2_ProcessQueue() { private void performBatch3_SchedulerInit() { try { - LOG.info("SchedulerInit Task triggered."); + LOG.debug("SchedulerInit Task triggered."); schedulerInit.init(); - LOG.info("SchedulerInit Task ended."); + LOG.debug("SchedulerInit Task ended."); } catch (Exception e) { LOG.error("ScheduleEntry init from scheduletaskrunner failed : " + e); } diff --git a/source/src/main/java/org/cerberus/core/service/har/impl/HarService.java b/source/src/main/java/org/cerberus/core/service/har/impl/HarService.java index 8bb489a6f6..0c07b319a8 100644 --- a/source/src/main/java/org/cerberus/core/service/har/impl/HarService.java +++ b/source/src/main/java/org/cerberus/core/service/har/impl/HarService.java @@ -447,8 +447,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setJsRequests(harStat.getJsRequests() + 1); tempList = harStat.getJsList(); - tempList.add(url); - harStat.setJsList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setJsList(tempList); + } break; case "css": if (reqSize > 0) { @@ -460,8 +462,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setCssRequests(harStat.getCssRequests() + 1); tempList = harStat.getCssList(); - tempList.add(url); - harStat.setCssList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setCssList(tempList); + } break; case "html": if (reqSize > 0) { @@ -473,8 +477,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setHtmlRequests(harStat.getHtmlRequests() + 1); tempList = harStat.getHtmlList(); - tempList.add(url); - harStat.setHtmlList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setHtmlList(tempList); + } break; case "img": if (reqSize > 0) { @@ -486,8 +492,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setImgRequests(harStat.getImgRequests() + 1); tempList = harStat.getImgList(); - tempList.add(url); - harStat.setImgList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setImgList(tempList); + } break; case "content": if (reqSize > 0) { @@ -499,8 +507,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setContentRequests(harStat.getContentRequests() + 1); tempList = harStat.getContentList(); - tempList.add(url); - harStat.setContentList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setContentList(tempList); + } break; case "font": if (reqSize > 0) { @@ -512,8 +522,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setFontRequests(harStat.getFontRequests() + 1); tempList = harStat.getFontList(); - tempList.add(url); - harStat.setFontList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setFontList(tempList); + } break; case "media": if (reqSize > 0) { @@ -525,8 +537,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setMediaRequests(harStat.getMediaRequests() + 1); tempList = harStat.getMediaList(); - tempList.add(url); - harStat.setMediaList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setMediaList(tempList); + } break; case "other": if (reqSize > 0) { @@ -538,8 +552,10 @@ private HarStat processEntry(HarStat harStat, JSONObject entry, String url, Stri } harStat.setOtherRequests(harStat.getOtherRequests() + 1); tempList = harStat.getOtherList(); - tempList.add(url); - harStat.setOtherList(tempList); + if (tempList != null) { + tempList.add(url); + harStat.setOtherList(tempList); + } break; } diff --git a/source/src/main/java/org/cerberus/core/service/rest/impl/RestService.java b/source/src/main/java/org/cerberus/core/service/rest/impl/RestService.java index d18d7309c6..151ea965ba 100644 --- a/source/src/main/java/org/cerberus/core/service/rest/impl/RestService.java +++ b/source/src/main/java/org/cerberus/core/service/rest/impl/RestService.java @@ -307,7 +307,7 @@ public boolean isTrusted(X509Certificate[] chain, String authType) throws Certif switch (method) { case AppService.METHOD_HTTPGET: - LOG.info("Start preparing the REST Call (GET). " + servicePath + " - " + requestString); + LOG.info("Start preparing the REST Call (GET). " + servicePath); if (AppService.SRVBODYTYPE_FORMDATA.equals(bodyType)) { // Adding query string from requestString diff --git a/source/src/main/java/org/cerberus/core/websocket/QueueStatusEndPoint.java b/source/src/main/java/org/cerberus/core/websocket/QueueStatusEndPoint.java index 3015836548..850664fbb1 100644 --- a/source/src/main/java/org/cerberus/core/websocket/QueueStatusEndPoint.java +++ b/source/src/main/java/org/cerberus/core/websocket/QueueStatusEndPoint.java @@ -21,6 +21,7 @@ import com.google.common.base.Predicates; import com.google.common.collect.Maps; +import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Date; @@ -150,7 +151,12 @@ public void send(QueueStatus queueStatus, boolean forcePush) { registeredSession.getBasicRemote().sendObject(queueStatus); LOG.debug("Queue Status sent to session " + registeredSession.getId()); } catch (Exception e) { - LOG.warn("Unable to send queue status to session " + registeredSession.getId() + " due to " + e.getMessage()); + LOG.warn("Unable to send queue status to session " + registeredSession.getId() + " due to " + e.getMessage() + " --> Closing it."); + try { + registeredSession.close(); + } catch (IOException ex) { + LOG.warn("Unable to close session " + registeredSession.getId() + " due to " + e.getMessage()); + } } }