Skip to content

Commit

Permalink
Simple change to trigger build
Browse files Browse the repository at this point in the history
  • Loading branch information
stzanakis committed Dec 20, 2024
1 parent 43cf962 commit 1adc650
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
import de.flapdoodle.reverse.TransitionWalker;
import de.flapdoodle.reverse.transitions.Start;
import eu.europeana.metis.network.NetworkUtil;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

/**
* Starts an in memory Mongo database. This class is to be used for unit testing on localhost.
*/
Expand All @@ -29,15 +28,15 @@ public class EmbeddedLocalhostMongo {

private static final String DEFAULT_MONGO_HOST = "127.0.0.1";
private static final ImmutableProcessOutput processOutput = ProcessOutput.builder()
.commands(Processors.logTo(LOGGER, Slf4jLevel.DEBUG))
.output(Processors.logTo(LOGGER, Slf4jLevel.INFO))
.error(Processors.logTo(LOGGER, Slf4jLevel.ERROR))
.build();
.commands(Processors.logTo(LOGGER, Slf4jLevel.DEBUG))
.output(Processors.logTo(LOGGER, Slf4jLevel.INFO))
.error(Processors.logTo(LOGGER, Slf4jLevel.ERROR))
.build();

private static final ImmutableMongodArguments mongodArguments = MongodArguments.defaults()
.withSyncDelay(0)
.withStorageEngine("ephemeralForTest")
.withUseNoJournal(true);
.withSyncDelay(0)
.withStorageEngine("ephemeralForTest")
.withUseNoJournal(true);

private TransitionWalker.ReachedState<RunningMongodProcess> runningMongodProcessReachedState;
private int mongoPort;
Expand All @@ -57,9 +56,10 @@ public void start() {
try {
mongoPort = new NetworkUtil().getAvailableLocalPort();
ImmutableMongod mongod = Mongod.instance()
.withNet(Start.to(Net.class).initializedWith(Net.builder().bindIp(DEFAULT_MONGO_HOST).port(mongoPort).isIpv6(true).build()))
.withProcessOutput(Start.to(ProcessOutput.class).initializedWith(processOutput))
.withMongodArguments(Start.to(MongodArguments.class).initializedWith(mongodArguments));
.withNet(Start.to(Net.class).initializedWith(
Net.builder().bindIp(DEFAULT_MONGO_HOST).port(mongoPort).isIpv6(true).build()))
.withProcessOutput(Start.to(ProcessOutput.class).initializedWith(processOutput))
.withMongodArguments(Start.to(MongodArguments.class).initializedWith(mongodArguments));

runningMongodProcessReachedState = mongod.start(Version.Main.V4_4);

Expand Down

0 comments on commit 1adc650

Please sign in to comment.