Skip to content

Commit 1b960e4

Browse files
committed
Merge branch '6.x' into index-lifecycle-6.x
2 parents 821f2bb + b00853e commit 1b960e4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

server/src/test/java/org/elasticsearch/common/time/DateFormattersTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ public void testEqualsAndHashcode() {
175175
assertThat(DateFormatters.forPattern("YYYY").withZone(ZoneId.of("CET")), not(equalTo(DateFormatters.forPattern("YYYY"))));
176176

177177
// different locale, thus not equals
178-
assertThat(DateFormatters.forPattern("YYYY").withLocale(randomLocale(random())),
179-
not(equalTo(DateFormatters.forPattern("YYYY"))));
178+
DateFormatter f1 = DateFormatters.forPattern("YYYY").withLocale(Locale.CANADA);
179+
DateFormatter f2 = f1.withLocale(Locale.FRENCH);
180+
assertThat(f1, not(equalTo(f2)));
180181

181182
// different pattern, thus not equals
182183
assertThat(DateFormatters.forPattern("YYYY"), not(equalTo(DateFormatters.forPattern("YY"))));

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowNodeTask.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.elasticsearch.index.shard.ShardNotFoundException;
2727
import org.elasticsearch.index.translog.Translog;
2828
import org.elasticsearch.indices.IndexClosedException;
29+
import org.elasticsearch.node.NodeClosedException;
2930
import org.elasticsearch.persistent.AllocatedPersistentTask;
3031
import org.elasticsearch.tasks.TaskId;
3132
import org.elasticsearch.transport.NodeDisconnectedException;
@@ -416,6 +417,7 @@ static boolean shouldRetry(Exception e) {
416417
actual instanceof IndexClosedException || // If follow index is closed
417418
actual instanceof NodeDisconnectedException ||
418419
actual instanceof NodeNotConnectedException ||
420+
actual instanceof NodeClosedException ||
419421
(actual.getMessage() != null && actual.getMessage().contains("TransportService is closed"));
420422
}
421423

0 commit comments

Comments
 (0)