[TEST] Disable assertions in HttpExportBulk class (elastic/x-pack-elasticsearch#4307)
An incorrect assertion was removed in elastic/x-pack-elasticsearch#4284, but it still causes
problems when BWC tests are run against released versions that
cannot be changed. This commit disables assertions for the
offending class for the old nodes in BWC clusters.
relates elastic/x-pack-elasticsearch#4264
Original commit: elastic/x-pack-elasticsearch@00dbdcbeb2196ffb43feb461922d4929e8719d5b
@@ -159,6 +159,16 @@ subprojects {
}
setting 'xpack.watcher.encrypt_sensitive_data', 'true'
}
+
+ // Old versions of the code contain an invalid assertion that trips
+ // during tests. Versions 5.6.9 and 6.2.4 have been fixed by removing
+ // the assertion, but this is impossible for released versions.
+ // However, released versions run without assertions, so end users won't
+ // be suffering the effects. This argument effectively removes the
+ // incorrect assertion from the older versions used in the BWC tests.
+ if (version.before('5.6.9') || (version.onOrAfter('6.0.0') && version.before('6.2.4'))) {
+ jvmArgs '-da:org.elasticsearch.xpack.monitoring.exporter.http.HttpExportBulk'
+ }
}
Task oldClusterTestRunner = tasks.getByName("${baseName}#oldClusterTestRunner")
