Skip to content

Commit 8e30ae3

Browse files
committed
Imports
1 parent 746b703 commit 8e30ae3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

modules/repository-s3/src/javaRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ConditionalWritesUnsupportedRestIT.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.elasticsearch.test.cluster.ElasticsearchCluster;
2626
import org.elasticsearch.test.cluster.LogType;
2727
import org.elasticsearch.test.fixtures.testcontainers.TestContainersThreadFilter;
28-
import org.hamcrest.Matchers;
2928
import org.junit.ClassRule;
3029
import org.junit.rules.RuleChain;
3130
import org.junit.rules.TestRule;
@@ -35,6 +34,9 @@
3534
import java.util.function.UnaryOperator;
3635

3736
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;
3840

3941
@ThreadLeakFilters(filters = { TestContainersThreadFilter.class })
4042
@ThreadLeakScope(ThreadLeakScope.Scope.NONE) // https://github.com/elastic/elasticsearch/issues/102482
@@ -119,15 +121,15 @@ public void testWarningLog() throws IOException {
119121
try (var ignored = testRepository.register(UnaryOperator.identity()); var logStream = cluster.getNodeLog(0, LogType.SERVER)) {
120122
assertThat(
121123
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("""
127129
is configured to unsafely avoid conditional writes which may lead to repository corruption; to resolve this \
128130
warning, upgrade your storage to a system that is fully compatible with AWS S3 and then remove the \
129131
[unsafely_incompatible_with_s3_conditional_writes] repository setting"""),
130-
Matchers.containsString(ReferenceDocs.S3_COMPATIBLE_REPOSITORIES.toString())
132+
containsString(ReferenceDocs.S3_COMPATIBLE_REPOSITORIES.toString())
131133
)
132134
)
133135
);

0 commit comments

Comments
 (0)