File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
client/rest-high-level/src/test/java/org/elasticsearch/client/documentation Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2750,8 +2750,8 @@ public void testGetServiceAccountCredentials() throws IOException {
27502750 // Cannot assert exactly one token because there are rare occasions where tests overlap and it will see
27512751 // token created from other tests
27522752 assertThat (serviceTokenInfos .size (), greaterThanOrEqualTo (1 ));
2753- assertThat (serviceTokenInfos .stream ().map (ServiceTokenInfo ::getName ).collect (Collectors .toSet ()), contains ("token2" ));
2754- assertThat (serviceTokenInfos .stream ().map (ServiceTokenInfo ::getSource ).collect (Collectors .toSet ()), contains ("index" ));
2753+ assertThat (serviceTokenInfos .stream ().map (ServiceTokenInfo ::getName ).collect (Collectors .toSet ()), hasItem ("token2" ));
2754+ assertThat (serviceTokenInfos .stream ().map (ServiceTokenInfo ::getSource ).collect (Collectors .toSet ()), hasItem ("index" ));
27552755 }
27562756
27572757 {
@@ -2785,7 +2785,7 @@ public void onFailure(Exception e) {
27852785 assertThat (future .actionGet ().getPrincipal (), equalTo ("elastic/fleet-server" ));
27862786 assertThat (future .actionGet ().getServiceTokenInfos ().size (), greaterThanOrEqualTo (1 ));
27872787 assertThat (future .actionGet ().getServiceTokenInfos ().stream ().map (ServiceTokenInfo ::getName ).collect (Collectors .toSet ()),
2788- contains ("token2" ));
2788+ hasItem ("token2" ));
27892789 }
27902790 }
27912791
You can’t perform that action at this time.
0 commit comments