Examples of simulateEventBusUnresponsive()


Examples of io.vertx.core.impl.VertxInternal.simulateEventBusUnresponsive()

  @Test
  public void testConnectionTimesOutNoPong() throws Exception {
    // Set an unreasonably quick reply time so it's bound to timeout
    startNodes(2, new VertxOptions().setClusterPingInterval(1).setClusterPingReplyInterval(1));
    VertxInternal vertxI = (VertxInternal)vertices[0];
    vertxI.simulateEventBusUnresponsive();
    AtomicBoolean sending = new AtomicBoolean();
    MessageConsumer<String> consumer = vertices[0].eventBus().<String>consumer("foobar").handler(msg -> {
      if (!sending.get()) {
        sending.set(true);
        vertx.setTimer(2000, id -> {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.