This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new c2d6135 CAMEL-12142 : default mongodb host c2d6135 is described below commit c2d613564b673cdeaee7853d25488171d9a22b03 Author: Farès Hassak <fares.has...@gmail.com> AuthorDate: Sat Jan 13 20:49:51 2018 +0100 CAMEL-12142 : default mongodb host --- .../apache/camel/component/mongodb/gridfs/EmbedMongoConfiguration.java | 3 ++- .../org/apache/camel/component/mongodb/EmbedMongoConfiguration.java | 3 ++- .../org/apache/camel/component/mongodb3/EmbedMongoConfiguration.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/EmbedMongoConfiguration.java b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/EmbedMongoConfiguration.java index a27dab8..d26af36 100644 --- a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/EmbedMongoConfiguration.java +++ b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/EmbedMongoConfiguration.java @@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static com.mongodb.ServerAddress.defaultHost; import static de.flapdoodle.embed.mongo.distribution.Version.Main.PRODUCTION; import static de.flapdoodle.embed.process.runtime.Network.localhostIsIPv6; import static org.springframework.util.SocketUtils.findAvailableTcpPort; @@ -60,6 +61,6 @@ public class EmbedMongoConfiguration { @Bean public MongoClient myDb() throws UnknownHostException { - return new MongoClient("0.0.0.0", PORT); + return new MongoClient(defaultHost(), PORT); } } \ No newline at end of file diff --git a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/EmbedMongoConfiguration.java b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/EmbedMongoConfiguration.java index 6a8b50a..5e5941b 100644 --- a/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/EmbedMongoConfiguration.java +++ b/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/EmbedMongoConfiguration.java @@ -28,6 +28,7 @@ import de.flapdoodle.embed.mongo.config.Net; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static com.mongodb.ServerAddress.defaultHost; import static de.flapdoodle.embed.mongo.distribution.Version.Main.PRODUCTION; import static de.flapdoodle.embed.process.runtime.Network.localhostIsIPv6; import static org.springframework.util.SocketUtils.findAvailableTcpPort; @@ -52,7 +53,7 @@ public class EmbedMongoConfiguration { @Bean public MongoClient myDb() throws UnknownHostException { - return new MongoClient("0.0.0.0", PORT); + return new MongoClient(defaultHost(), PORT); } } \ No newline at end of file diff --git a/components/camel-mongodb3/src/test/java/org/apache/camel/component/mongodb3/EmbedMongoConfiguration.java b/components/camel-mongodb3/src/test/java/org/apache/camel/component/mongodb3/EmbedMongoConfiguration.java index 50c119c..53e9238 100644 --- a/components/camel-mongodb3/src/test/java/org/apache/camel/component/mongodb3/EmbedMongoConfiguration.java +++ b/components/camel-mongodb3/src/test/java/org/apache/camel/component/mongodb3/EmbedMongoConfiguration.java @@ -34,6 +34,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import static com.mongodb.MongoClientOptions.builder; +import static com.mongodb.ServerAddress.defaultHost; import static de.flapdoodle.embed.mongo.distribution.Version.Main.PRODUCTION; import static de.flapdoodle.embed.process.runtime.Network.localhostIsIPv6; import static org.springframework.util.SocketUtils.findAvailableTcpPort; @@ -55,7 +56,7 @@ public class EmbedMongoConfiguration { @Bean public MongoClient myDb() throws UnknownHostException { - return new MongoClient("0.0.0.0", PORT); + return new MongoClient(defaultHost(), PORT); } @Bean -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" <commits@camel.apache.org>'].