This commit is contained in:
Phillip Webb
2015-06-02 10:53:08 -07:00
parent 10f7031e46
commit 968b68c322
14 changed files with 107 additions and 98 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +33,10 @@ import static org.junit.Assert.assertTrue;
*/
public class SampleElasticsearchApplicationTests {
private static final String[] PROPERTIES = {
"spring.data.elasticsearch.properties.path.data:target/data",
"spring.data.elasticsearch.properties.path.logs:target/logs" };
@Rule
public OutputCapture outputCapture = new OutputCapture();
@@ -40,10 +44,7 @@ public class SampleElasticsearchApplicationTests {
public void testDefaultSettings() throws Exception {
try {
new SpringApplicationBuilder(SampleElasticsearchApplication.class)
.properties(
"spring.data.elasticsearch.properties.path.data:target/data",
"spring.data.elasticsearch.properties.path.logs:target/logs")
.run();
.properties(PROPERTIES).run();
}
catch (IllegalStateException ex) {
if (serverNotRunning(ex)) {