|
7 | 7 |
|
8 | 8 | import org.elasticsearch.action.UnavailableShardsException;
|
9 | 9 | import org.elasticsearch.common.UUIDs;
|
| 10 | +import org.elasticsearch.common.breaker.CircuitBreakingException; |
10 | 11 | import org.elasticsearch.common.unit.ByteSizeUnit;
|
11 | 12 | import org.elasticsearch.common.unit.ByteSizeValue;
|
12 | 13 | import org.elasticsearch.common.unit.TimeValue;
|
| 14 | +import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; |
13 | 15 | import org.elasticsearch.index.seqno.LocalCheckpointTracker;
|
14 | 16 | import org.elasticsearch.index.shard.ShardId;
|
15 | 17 | import org.elasticsearch.index.translog.Translog;
|
@@ -285,7 +287,10 @@ private static TestRun createTestRun(long startSeqNo, long startMappingVersion,
|
285 | 287 | List<TestResponse> item = new ArrayList<>();
|
286 | 288 | // Sometimes add a random retryable error
|
287 | 289 | if (sometimes()) {
|
288 |
| - Exception error = new UnavailableShardsException(new ShardId("test", "test", 0), ""); |
| 290 | + Exception error = randomFrom( |
| 291 | + new UnavailableShardsException(new ShardId("test", "test", 0), ""), |
| 292 | + new CircuitBreakingException("test", randomInt(), randomInt()), |
| 293 | + new EsRejectedExecutionException("test")); |
289 | 294 | item.add(new TestResponse(error, mappingVersion, settingsVersion, null));
|
290 | 295 | }
|
291 | 296 | // Sometimes add an empty shard changes response to also simulate a leader shard lagging behind
|
|
0 commit comments