Created
September 18, 2013 15:04
-
-
Save mox601/6610488 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BeforeClass | |
protected void setUpMongoInstance() throws Exception { | |
// final IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder() | |
// .defaultsWithLogger(Command.MongoD, LOGGER) | |
// .build(); | |
final MongodStarter runtime = MongodStarter.getDefaultInstance(); | |
mongodExecutable = runtime.prepare(new MongodConfig(Version.Main.DEVELOPMENT, PORT, | |
Network.localhostIsIPv6())); | |
mongodProcess = mongodExecutable.start(); | |
mongoClient = new MongoClient("localhost", PORT); | |
} | |
@AfterClass | |
protected void tearDownMongoInstance() throws Exception { | |
mongodProcess.stop(); | |
mongodExecutable.stop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment