title: How to prevent embedded MongoDB from starting?
body: <p>I wish to create some tests that require MongoDB, so I add the following to my build.gradle:</p>
  
  <pre><code>testCompile('de.flapdoodle.embed:de.flapdoodle.embed.mongo')
  </code></pre>
  
  <p>However, unexpectedly, this is causing the embedded MongoDB to be started in my application when running from Eclipse?</p>
  
  <pre><code>2018-06-21 11:10:53.264  INFO 13748 --- [      Thread-36] o.s.b.a.mongo.embedded.EmbeddedMongo     : 2018-06-21T11:10:53.216-0500 I CONTROL  [initandlisten] MongoDB starting : pid=5372 port=59475 dbpath=C:\Users\dnaylor\AppData\Local\Temp\3\embedmongo-db-7b002e5e-9dc0-4ac6-8582-93b2e2937ca6
  </code></pre>
  
  <p>If I take out the testCompile, then my application connects to the external MongoDB server as expected. </p>
  
  <p>How can I configure things so that it only starts when I am running a test? I thought that adding dependencies to testCompile would only affect tests, but I guess I am wrong on this point?</p>