testShrinkAfterUpgrade should only set mapping.single_type if bwc version > 5.5.0
It was only added in
@@ -430,7 +430,10 @@ public class FullClusterRestartIT extends ESRestTestCase {
if (runningAgainstOldCluster) {
XContentBuilder mappingsAndSettings = jsonBuilder();
mappingsAndSettings.startObject();
- if (oldClusterVersion.major == 5 && randomBoolean()) {
+ // single type was added in 5.5.0 (see #24317)
+ if (oldClusterVersion.onOrAfter(Version.V_5_5_0) &&
+ oldClusterVersion.before(Version.V_6_0_0_beta1) &&
+ randomBoolean()) {
{
// test that mapping.single_type is correctly propagated on the shrinked index,
// if not, search will fail.
