File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
server/src/internalClusterTest/java/org/elasticsearch/snapshots Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7171import static org .elasticsearch .repositories .blobstore .BlobStoreRepository .getRepositoryDataBlobName ;
7272import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertAcked ;
7373import static org .hamcrest .Matchers .empty ;
74+ import static org .hamcrest .Matchers .hasItem ;
7475import static org .hamcrest .Matchers .hasSize ;
7576import static org .hamcrest .Matchers .in ;
7677import static org .hamcrest .Matchers .is ;
@@ -672,8 +673,8 @@ public void testFilterByState() throws Exception {
672673 snapshots = getSnapshotsForStates .apply (EnumSet .of (SnapshotState .SUCCESS , SnapshotState .IN_PROGRESS ));
673674 assertThat (snapshots , hasSize (2 ));
674675 var states = snapshots .stream ().map (SnapshotInfo ::state ).collect (Collectors .toSet ());
675- assertTrue (states . contains (SnapshotState .SUCCESS ));
676- assertTrue (states . contains (SnapshotState .IN_PROGRESS ));
676+ assertThat (states , hasItem (SnapshotState .SUCCESS ));
677+ assertThat (states , hasItem (SnapshotState .IN_PROGRESS ));
677678
678679 // Fetch all snapshots (without state)
679680 snapshots = clusterAdmin ().prepareGetSnapshots (TEST_REQUEST_TIMEOUT , repoName ).get ().getSnapshots ();
You can’t perform that action at this time.
0 commit comments