Skip to content

Commit a3e2d2a

Browse files
committed
testShrinkAfterUpgrade should only set mapping.single_type if bwc version > 5.5.0
It was only added in #24317
1 parent 892b7d5 commit a3e2d2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,10 @@ public void testShrinkAfterUpgrade() throws IOException {
430430
if (runningAgainstOldCluster) {
431431
XContentBuilder mappingsAndSettings = jsonBuilder();
432432
mappingsAndSettings.startObject();
433-
if (oldClusterVersion.major == 5 && randomBoolean()) {
433+
// single type was added in 5.5.0 (see #24317)
434+
if (oldClusterVersion.onOrAfter(Version.V_5_5_0) &&
435+
oldClusterVersion.before(Version.V_6_0_0_beta1) &&
436+
randomBoolean()) {
434437
{
435438
// test that mapping.single_type is correctly propagated on the shrinked index,
436439
// if not, search will fail.

0 commit comments

Comments
 (0)