/** * Create a proxy to a service that is deployed somewhere on the event bus * @param vertx the Vert.x instance * @param address the address the service is listening on on the event bus * @return the service */ public static io.vertx.rxjava.ext.mongo.MongoService createEventBusProxy(io.vertx.rxjava.core.Vertx vertx, String address) { io.vertx.rxjava.ext.mongo.MongoService ret = io.vertx.rxjava.ext.mongo.MongoService.newInstance(io.vertx.ext.mongo.MongoService.createEventBusProxy(vertx.getDelegate(), address)); return ret; }
@Override public void setUp() throws Exception { super.setUp(); JsonObject config = getConfig(); DeploymentOptions options = new DeploymentOptions().setConfig(config); CountDownLatch latch = new CountDownLatch(1); vertx.deployVerticle("service:io.vertx.mongo-service", options, onSuccess(id -> { mongoClient = MongoService.createEventBusProxy(vertx, "vertx.mongo"); dropCollections(mongoClient, latch); })); awaitLatch(latch); }