diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SebClientConnectionServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SebClientConnectionServiceImpl.java index 817b3424..19d9e796 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SebClientConnectionServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SebClientConnectionServiceImpl.java @@ -404,6 +404,7 @@ public class SebClientConnectionServiceImpl implements SebClientConnectionServic .stream()) .map(token -> cache.get(token, ClientConnectionDataInternal.class)) .filter(Objects::nonNull) + .filter(connection -> connection.clientConnection.status == ConnectionStatus.ESTABLISHED) .flatMap(connection -> connection.pingMappings.stream()) .map(ping -> ping.updateLogEvent()) .filter(Objects::nonNull) diff --git a/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java b/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java index 45e7ba44..5a28f4e4 100644 --- a/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java +++ b/src/test/java/ch/ethz/seb/sebserver/HTTPClientBot.java @@ -79,8 +79,8 @@ public class HTTPClientBot { public HTTPClientBot(final Map args) { - // this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080"); - this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080"); + this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080"); + // this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080"); //this.webserviceAddress = args.getOrDefault("webserviceAddress", "https://seb.test-swissmooc.ch"); this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token"); @@ -100,7 +100,7 @@ public class HTTPClientBot { this.pingInterval = Long.parseLong(args.getOrDefault("pingInterval", "200")); this.errorInterval = Long.parseLong(args.getOrDefault("errorInterval", String.valueOf(TEN_SECONDS))); // this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE))); - this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_HOUR))); + this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE))); this.connectionAttempts = Integer.parseInt(args.getOrDefault("connectionAttempts", "1")); for (int i = 0; i < this.numberOfConnections; i++) { diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml index 5cd394dd..f74db255 100644 --- a/src/test/resources/logback-test.xml +++ b/src/test/resources/logback-test.xml @@ -6,7 +6,7 @@ - + \ No newline at end of file