Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1006,11 +1006,11 @@ private enum ElasticsearchExceptionHandle {
UNKNOWN_NAMED_OBJECT_EXCEPTION(org.elasticsearch.common.xcontent.UnknownNamedObjectException.class,
org.elasticsearch.common.xcontent.UnknownNamedObjectException::new, 148, UNKNOWN_VERSION_ADDED),
TOO_MANY_BUCKETS_EXCEPTION(MultiBucketConsumerService.TooManyBucketsException.class,
MultiBucketConsumerService.TooManyBucketsException::new, 149, Version.V_7_0_0),
MultiBucketConsumerService.TooManyBucketsException::new, 149, Version.V_6_2_0),
COORDINATION_STATE_REJECTED_EXCEPTION(org.elasticsearch.cluster.coordination.CoordinationStateRejectedException.class,
org.elasticsearch.cluster.coordination.CoordinationStateRejectedException::new, 150, Version.V_7_0_0),
SNAPSHOT_IN_PROGRESS_EXCEPTION(org.elasticsearch.snapshots.SnapshotInProgressException.class,
org.elasticsearch.snapshots.SnapshotInProgressException::new, 151, Version.V_7_0_0),
org.elasticsearch.snapshots.SnapshotInProgressException::new, 151, Version.V_6_7_0),
NO_SUCH_REMOTE_CLUSTER_EXCEPTION(org.elasticsearch.transport.NoSuchRemoteClusterException.class,
org.elasticsearch.transport.NoSuchRemoteClusterException::new, 152, Version.V_6_7_0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ public void testCircuitBreakingException() throws IOException {
}

public void testTooManyBucketsException() throws IOException {
Version version = VersionUtils.randomVersionBetween(random(), Version.V_6_2_0, Version.CURRENT);
MultiBucketConsumerService.TooManyBucketsException ex =
serialize(new MultiBucketConsumerService.TooManyBucketsException("Too many buckets", 100),
randomFrom(Version.V_7_0_0));
serialize(new MultiBucketConsumerService.TooManyBucketsException("Too many buckets", 100), version);
assertEquals("Too many buckets", ex.getMessage());
assertEquals(100, ex.getMaxBuckets());
}
Expand Down Expand Up @@ -880,6 +880,13 @@ public void testShardLockObtainFailedException() throws IOException {
assertEquals(orig.getShardId(), ex.getShardId());
}

public void testSnapshotInProgressException() throws IOException {
SnapshotInProgressException orig = new SnapshotInProgressException("boom");
Version version = VersionUtils.randomVersionBetween(random(), Version.V_6_7_0, Version.CURRENT);
SnapshotInProgressException ex = serialize(orig, version);
assertEquals(orig.getMessage(), ex.getMessage());
}

private static class UnknownException extends Exception {
UnknownException(final String message, final Exception cause) {
super(message, cause);
Expand Down