Repair intermittent test failure in NewPendingTransactionAcceptanctTest (#195)

Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
pull/209/head
Trent Mohay 5 years ago committed by GitHub
parent ddb8fa425f
commit f0d1a00f80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/pubsub/WebSocketConnection.java

@ -30,6 +30,7 @@ import io.vertx.core.http.RequestOptions;
import io.vertx.core.http.WebSocket; import io.vertx.core.http.WebSocket;
import io.vertx.core.json.DecodeException; import io.vertx.core.json.DecodeException;
import io.vertx.core.json.Json; import io.vertx.core.json.Json;
import org.apache.commons.lang3.exception.ExceptionUtils;
public class WebSocketConnection { public class WebSocketConnection {
@ -102,7 +103,11 @@ public class WebSocketConnection {
} }
} catch (final DecodeException e) { } catch (final DecodeException e) {
error(data.toString()); error(
"Data: "
+ data.toString()
+ "\nException: "
+ ExceptionUtils.getStackTrace(e));
} }
}); });
}); });
@ -115,24 +120,24 @@ public class WebSocketConnection {
} }
private void resetLatestResult() { private void resetLatestResult() {
this.receivedResponse = false;
this.error = null; this.error = null;
this.latestEvent = null; this.latestEvent = null;
this.receivedResponse = false;
} }
private void error(final String response) { private void error(final String response) {
this.receivedResponse = true;
this.error = response; this.error = response;
this.receivedResponse = true;
} }
private void success(final JsonRpcSuccessEvent result) { private void success(final JsonRpcSuccessEvent result) {
this.receivedResponse = true;
this.latestEvent = result; this.latestEvent = result;
this.receivedResponse = true;
} }
private void success(final SubscriptionEvent result) { private void success(final SubscriptionEvent result) {
this.receivedResponse = true;
this.subscriptionEvents.add(result); this.subscriptionEvents.add(result);
this.receivedResponse = true;
} }
public List<SubscriptionEvent> getSubscriptionEvents() { public List<SubscriptionEvent> getSubscriptionEvents() {

Loading…
Cancel
Save