Move back to JUnit 4 until SUREFIRE-1614 has been resolved
See gh-14736 See gh-14737 See gh-14738
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -17,11 +17,11 @@
|
||||
package sample.data.elasticsearch;
|
||||
|
||||
import org.elasticsearch.client.transport.NoNodeAvailableException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.test.extension.OutputCapture;
|
||||
import org.springframework.boot.test.rule.OutputCapture;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -32,8 +32,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class SampleElasticsearchApplicationTests {
|
||||
|
||||
@RegisterExtension
|
||||
OutputCapture output = new OutputCapture();
|
||||
@Rule
|
||||
public final OutputCapture output = new OutputCapture();
|
||||
|
||||
@Test
|
||||
public void testDefaultSettings() {
|
||||
@@ -46,7 +46,8 @@ public class SampleElasticsearchApplicationTests {
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
assertThat(this.output).contains("firstName='Alice', lastName='Smith'");
|
||||
assertThat(this.output.toString())
|
||||
.contains("firstName='Alice', lastName='Smith'");
|
||||
}
|
||||
|
||||
private boolean elasticsearchRunning(Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user