|
25 | 25 | import org.elasticsearch.test.cluster.ElasticsearchCluster; |
26 | 26 | import org.elasticsearch.test.cluster.LogType; |
27 | 27 | import org.elasticsearch.test.fixtures.testcontainers.TestContainersThreadFilter; |
28 | | -import org.hamcrest.Matchers; |
29 | 28 | import org.junit.ClassRule; |
30 | 29 | import org.junit.rules.RuleChain; |
31 | 30 | import org.junit.rules.TestRule; |
|
35 | 34 | import java.util.function.UnaryOperator; |
36 | 35 |
|
37 | 36 | import static fixture.aws.AwsCredentialsUtils.fixedAccessKey; |
| 37 | +import static org.hamcrest.Matchers.allOf; |
| 38 | +import static org.hamcrest.Matchers.containsString; |
| 39 | +import static org.hamcrest.Matchers.hasItem; |
38 | 40 |
|
39 | 41 | @ThreadLeakFilters(filters = { TestContainersThreadFilter.class }) |
40 | 42 | @ThreadLeakScope(ThreadLeakScope.Scope.NONE) // https://github.com/elastic/elasticsearch/issues/102482 |
@@ -119,15 +121,15 @@ public void testWarningLog() throws IOException { |
119 | 121 | try (var ignored = testRepository.register(UnaryOperator.identity()); var logStream = cluster.getNodeLog(0, LogType.SERVER)) { |
120 | 122 | assertThat( |
121 | 123 | Streams.readAllLines(logStream), |
122 | | - Matchers.hasItem( |
123 | | - Matchers.allOf( |
124 | | - Matchers.containsString("WARN"), |
125 | | - Matchers.containsString(repoName), |
126 | | - Matchers.containsString(""" |
| 124 | + hasItem( |
| 125 | + allOf( |
| 126 | + containsString("WARN"), |
| 127 | + containsString(repoName), |
| 128 | + containsString(""" |
127 | 129 | is configured to unsafely avoid conditional writes which may lead to repository corruption; to resolve this \ |
128 | 130 | warning, upgrade your storage to a system that is fully compatible with AWS S3 and then remove the \ |
129 | 131 | [unsafely_incompatible_with_s3_conditional_writes] repository setting"""), |
130 | | - Matchers.containsString(ReferenceDocs.S3_COMPATIBLE_REPOSITORIES.toString()) |
| 132 | + containsString(ReferenceDocs.S3_COMPATIBLE_REPOSITORIES.toString()) |
131 | 133 | ) |
132 | 134 | ) |
133 | 135 | ); |
|
0 commit comments