Skip to content

Commit

Permalink
Seems like random integration test failure due to concurrency issues …
Browse files Browse the repository at this point in the history
…(locally test runs ok)

Some logging added and timeouts increased (to be slightly greater than server shutdown timeout) to debug the issue
  • Loading branch information
Eugene Pakhomov committed Jun 27, 2018
1 parent 7cd50d3 commit 4e6628e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,16 @@ public void clientLost() {
}

public void started() throws Exception {
final String host = "127.0.0.1";

if (!isStarted) {
int port = 8890;
if (server instanceof JSONTestServer) {
port = 8887;
}

server.open("127.0.0.1", port, dummyHandlers.generateServerEventsHandler());
logger.info("Server started on port: {}", port);
server.open(host, port, dummyHandlers.generateServerEventsHandler());
logger.info("Server started on host: {}, port: {}", host, port);
isStarted = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract class JSONBaseSpec extends Specification {
FakeChargePoint chargePoint = new FakeChargePoint()

def setupSpec() {
def conditions = new PollingConditions(timeout: 10)
def conditions = new PollingConditions(timeout: 11)

// When a Central System is running
centralSystem.started()
Expand All @@ -36,7 +36,7 @@ abstract class JSONBaseSpec extends Specification {
}

def cleanupSpec() {
def conditions = new PollingConditions(timeout: 10)
def conditions = new PollingConditions(timeout: 11)

centralSystem.stopped()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public void onError(Exception ex) {
}

configure();

logger.debug("Trying to connect to: {}", resource);

try {
client.connectBlocking();
closed = false;
Expand Down

0 comments on commit 4e6628e

Please sign in to comment.