We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e82b432 commit 05d30cdCopy full SHA for 05d30cd
1 file changed
test/framework/src/main/java/org/opensearch/test/rest/OpenSearchRestTestCase.java
@@ -708,11 +708,14 @@ protected void refreshAllIndices() throws IOException {
708
requestOptions.setWarningsHandler(warnings -> {
709
if (warnings.isEmpty()) {
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
}
+ boolean allSystemIndexWarning = true;
+ for (String warning : warnings) {
+ if (!warning.startsWith("this request accesses system indices:")) {
+ allSystemIndexWarning = false;
716
+ }
717
718
+ return !allSystemIndexWarning;
719
});
720
refreshRequest.setOptions(requestOptions);
721
client().performRequest(refreshRequest);
0 commit comments