*/
protected void pingSingleJob(String location) throws Exception{
log.info("Start pinging {} ... ", location);
boolean waiting = true;
while(waiting){
Request req = builder.buildOtherRequest(new HttpGet(location));
req.withHeader("Accept", "application/json");
log.info("Ping method: {}", req.getRequest().getMethod());
log.info("Ping location: {}", req.getRequest().getURI());
req.getRequest().setHeader("Accept","application/json");
log.info("headers:");
for(Header h : req.getRequest().getAllHeaders()){
log.info("{}: {}", h.getName(), h.getValue());
}
log.info("Request line:\n\n {} \n\n", req.getRequest().getRequestLine().toString());
try{
String content = executor.execute(req).assertStatus(200).assertContentType("application/json").getContent();
log.info("JSON content:\n\n {} \n\n",content);
JSONObject json = new JSONObject(content);
String status = json.getString("status");