File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
test/framework/src/main/java/org/elasticsearch/test/rest Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -169,14 +169,16 @@ public abstract class ESRestTestCase extends ESTestCase {
169
169
private static final String EXPECTED_ROLLUP_WARNING_MESSAGE =
170
170
"The rollup functionality will be removed in Elasticsearch 10.0. See docs for more information." ;
171
171
public static final RequestOptions .Builder ROLLUP_REQUESTS_OPTIONS = RequestOptions .DEFAULT .toBuilder ().setWarningsHandler (warnings -> {
172
- // Either no warning, because of bwc integration test OR
173
- // the expected warning, because on current version
174
172
if (warnings .isEmpty ()) {
175
173
return false ;
176
- } else if (warnings .size () == 1 && EXPECTED_ROLLUP_WARNING_MESSAGE .equals (warnings .get (0 ))) {
177
- return false ;
178
174
} else {
179
- return true ;
175
+ // Sometimes multiple rollup deprecation warnings. Transport actions can be invoked multiple time on different nodes.
176
+ for (String warning : warnings ) {
177
+ if (EXPECTED_ROLLUP_WARNING_MESSAGE .equals (warning ) == false ) {
178
+ return true ;
179
+ }
180
+ }
181
+ return false ;
180
182
}
181
183
});
182
184
You can’t perform that action at this time.
0 commit comments