Use a random server port in the Couchbase sample’s tests

This commit is contained in:
Andy Wilkinson 2016-02-19 16:13:42 +00:00
parent df6c204193
commit 99b3af9216
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class SampleCouchbaseApplicationTests {
public void testDefaultSettings() throws Exception { public void testDefaultSettings() throws Exception {
try { try {
new SpringApplicationBuilder(SampleCouchbaseApplication.class) new SpringApplicationBuilder(SampleCouchbaseApplication.class)
.run(); .run("--server.port=0");
} }
catch (RuntimeException ex) { catch (RuntimeException ex) {
if (serverNotRunning(ex)) { if (serverNotRunning(ex)) {