@@ -163,23 +163,12 @@ public void testCreateSnapshot() throws Exception {
163
163
CreateSnapshotResponse response = createTestSnapshot (request );
164
164
assertEquals (waitForCompletion ? RestStatus .OK : RestStatus .ACCEPTED , response .status ());
165
165
if (waitForCompletion == false ) {
166
- // busy assert on the delete because a known race condition could cause the delete request to not see
167
- // the snapshot if delete and snapshot finalization happen at the same time
168
- // See https://github.com/elastic/elasticsearch/issues/53509#issuecomment-603899620 for details
169
- // TODO: Remove busy assert in 7.x+ once this race is fixed
170
- assertBusy (() -> {
171
- // If we don't wait for the snapshot to complete we have to cancel it to not leak the snapshot task
172
- AcknowledgedResponse deleteResponse ;
173
- try {
174
- deleteResponse = execute (
175
- new DeleteSnapshotRequest (repository , snapshot ),
176
- highLevelClient ().snapshot ()::delete , highLevelClient ().snapshot ()::deleteAsync
177
- );
178
- } catch (Exception e ) {
179
- throw new AssertionError (e );
180
- }
181
- assertTrue (deleteResponse .isAcknowledged ());
182
- });
166
+ // If we don't wait for the snapshot to complete we have to cancel it to not leak the snapshot task
167
+ AcknowledgedResponse deleteResponse = execute (
168
+ new DeleteSnapshotRequest (repository , snapshot ),
169
+ highLevelClient ().snapshot ()::delete , highLevelClient ().snapshot ()::deleteAsync
170
+ );
171
+ assertTrue (deleteResponse .isAcknowledged ());
183
172
}
184
173
}
185
174
0 commit comments