Skip to content

Commit

Permalink
reduced log size and cleaned some non blocking npe errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
vertigo17 committed Jul 10, 2024
1 parent 21641a3 commit e6fff27
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
}
}

Expand Down

0 comments on commit e6fff27

Please sign in to comment.