Package org.mokai.impl.camel

Examples of org.mokai.impl.camel.CamelRoutingEngine.shutdown()


      // wait
      barrier.await(20, TimeUnit.SECONDS);

      Assert.assertEquals(1, processor.getCount());
    } finally {
      routingEngine.shutdown();
    }
  }

  @Test
  public void testToApplicationsMessageFlow() throws Exception {
View Full Code Here


      // wait
      barrier.await(20, TimeUnit.SECONDS);

      Assert.assertEquals(1, processor.getCount());
    } finally {
      routingEngine.shutdown();
    }
  }

  @Test
  public void testUnroutableConnections() throws Exception {
View Full Code Here

      // wait
      barrier.await(3, TimeUnit.SECONDS);

      Assert.assertEquals(0, processor.getCount());
    } finally {
      routingEngine.shutdown();
    }
  }

  @Test
  public void testUnroutableApplications() throws Exception {
View Full Code Here

      // wait
      barrier.await(3, TimeUnit.SECONDS);

      Assert.assertEquals(0, processor.getCount());
    } finally {
      routingEngine.shutdown();
    }
  }

  @Test
  public void testRetryFailedMessages() throws Exception {
View Full Code Here

      verify(connectionProcessor, timeout(1500)).process(any(Message.class));
      verify(applicationProcessor, timeout(1500)).process(any(Message.class));
      verify(messageStore, times(4)).saveOrUpdate(any(Message.class));

    } finally {
      routingEngine.shutdown();
    }
  }

  /**
   * Mock Processor that counts processed messages.
View Full Code Here

      psTest = connectorServices.get(1);
      Assert.assertEquals(cs1, psTest); // the one with 2000 priority

    } finally {
      routingEngine.shutdown();
    }
  }

  /**
   * This method is here so we can test that the routing engine is passing the change listener correctlly.
View Full Code Here

      cs1.start();
      cs1.stop();

      verify(listener, times(2)).changed(cs1, Direction.TO_CONNECTIONS);
    } finally {
      routingEngine.shutdown();
    }
  }

  /**
   * This method is here so we can test that the routing engine is passing the change listener correctlly.
View Full Code Here

      cs1.start();
      cs1.stop();

      verify(listener, times(2)).changed(cs1, Direction.TO_APPLICATIONS);
    } finally {
      routingEngine.shutdown();
    }

  }

  @Test
View Full Code Here

      // add a connection
      routingEngine.addConnection("test1", connector);

      verify((Configurable) connector).configure();
    } finally {
      routingEngine.shutdown();
    }
  }

  @Test
  public void testRetrieveConnection() throws Exception {
View Full Code Here

      // try to retrieve an unexisting connector
      csTest = routingEngine.getConnection("nonexisting");
      Assert.assertNull(csTest);
    } finally {
      routingEngine.shutdown();
    }

  }

  @Test
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.