File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
test/framework/src/main/java/org/opensearch/test/rest Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -708,11 +708,14 @@ protected void refreshAllIndices() throws IOException {
708
708
requestOptions .setWarningsHandler (warnings -> {
709
709
if (warnings .isEmpty ()) {
710
710
return false ;
711
- } else if (warnings .size () > 1 ) {
712
- return true ;
713
- } else {
714
- return warnings .get (0 ).startsWith ("this request accesses system indices:" ) == false ;
715
711
}
712
+ boolean allSystemIndexWarning = true ;
713
+ for (String warning : warnings ) {
714
+ if (!warning .startsWith ("this request accesses system indices:" )) {
715
+ allSystemIndexWarning = false ;
716
+ }
717
+ }
718
+ return !allSystemIndexWarning ;
716
719
});
717
720
refreshRequest .setOptions (requestOptions );
718
721
client ().performRequest (refreshRequest );
You can’t perform that action at this time.
0 commit comments