Package de.flapdoodle.embed.mongo

Examples of de.flapdoodle.embed.mongo.MongodProcess


            .net(new Net(port, Network.localhostIsIPv6()))
            .build();

        try {
            mongodExecutable = starter.prepare(mongodConfig);
            MongodProcess mongod = mongodExecutable.start();
           
            mongoClient = FiberMongoFactory.createClient( "mongodb://localhost:" + port + "/test?maxConnectionCount=10" ).asSerializedClient();
        } catch (IOException ioe) {
            tearDownClass();
        }
View Full Code Here


    public void execute() throws MojoExecutionException, MojoFailureException {
        if (skip) {
            return;
        }
       
        MongodProcess mongod = (MongodProcess)getPluginContext().get(StartEmbeddedMongoMojo
            .MONGOD_CONTEXT_PROPERTY_NAME);

        if (mongod != null) {
            mongod.stop();
        } else {
            throw new MojoFailureException("No mongod process found, it appears embedmongo:start was not called");
        }
    }
View Full Code Here

        } catch (IOException e) {
            throw new MojoExecutionException("Unable to Config MongoDB: ", e);
        }

        try {
            MongodProcess mongod = executable.start();

            if (wait) {
                while (true) {
                    try {
                        TimeUnit.MINUTES.sleep(5);
View Full Code Here

            .prepare(new MongodConfigBuilder()
                .version(mongoVersion)
                .net(new Net(Integer.parseInt(mongoClientURI
                    .getURI().split(":")[2]), false))
                .build());
        MongodProcess _mongod = _mongodExe.start();
        MongoClient mongoClient = new MongoClient(mongoClientURI);

        base.evaluate();

        mongoClient.close();
        _mongod.stop();
        _mongodExe.stop();
      }
    };
  }
View Full Code Here

TOP

Related Classes of de.flapdoodle.embed.mongo.MongodProcess

Copyright © 2018 www.massapicom. 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.