@@ -167,42 +167,6 @@ public static function cleanUpCluster(Client $client): void
167
167
self ::ensureNoInitializingShards ($ client );
168
168
self ::wipeCluster ($ client );
169
169
self ::waitForClusterStateUpdatesToFinish ($ client );
170
- self ::checkForUnexpectedlyRecreatedObjects ($ client );
171
- }
172
-
173
- /**
174
- * This method checks whether ILM policies or templates get recreated after they have been deleted. If so, we are probably deleting
175
- * them unnecessarily, potentially causing test performance problems. This could happen for example if someone adds a new standard ILM
176
- * policy but forgets to put it in the exclusion list in this test.
177
- *
178
- * @see ESRestTestCase.java:checkForUnexpectedlyRecreatedObjects()
179
- */
180
- private static function checkForUnexpectedlyRecreatedObjects (Client $ client ): void
181
- {
182
- if (self ::$ hasIlm ) {
183
- $ policies = self ::getAllUnexpectedIlmPolicies ($ client );
184
- if (!empty ($ policies )) {
185
- throw new Exception (sprintf (
186
- "Expected no ILM policies after deletions, but found %s " ,
187
- implode (', ' , array_keys ($ policies ))
188
- ));
189
- }
190
- }
191
- }
192
-
193
- /**
194
- * @see ESRestTestCase.java:getAllUnexpectedIlmPolicies()
195
- */
196
- private static function getAllUnexpectedIlmPolicies (Client $ client ): array
197
- {
198
- try {
199
- return $ client ->ilm ()->getLifecycle ()->asArray ();
200
- } catch (ClientResponseException $ e ) {
201
- if (in_array ($ e ->getCode (), [400 , 405 ])) {
202
- return [];
203
- }
204
- throw $ e ;
205
- }
206
170
}
207
171
208
172
/**
0 commit comments