-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
With #27778 we changed the logic what versions are classified as snapshot versions (by considering the value of build.snapshot). As a consequence, VersionUtilsTest#testGradleVersionsMatchVersionUtils is now failing if a build runs with -Dbuild.snapshot=false.
Reproduction line: gradle :test:framework:test -Dtests.class=org.elasticsearch.test.VersionUtilsTests -Dtests.method="testGradleVersionsMatchVersionUtils" -Dtests.security.manager=true -Dbuild.snapshot=false -Dtests.jvm.argline="-Dbuild.snapshot=false"
Fails with:
08:19:52 FAILURE 0.02s J0 | VersionUtilsTests.testGradleVersionsMatchVersionUtils <<< FAILURES!
08:19:52 > Throwable #1: java.lang.AssertionError: expected:<[6.0.0, 6.0.1]> but was:<[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.2.0]>
08:19:52 > at __randomizedtesting.SeedInfo.seed([D4465A3589E8FF0E:185403044F8B2C0]:0)
08:19:52 > at org.elasticsearch.test.VersionUtilsTests.testGradleVersionsMatchVersionUtils(VersionUtilsTests.java:278)
08:19:52 > at java.lang.Thread.run(Thread.java:748)
(taken from elastic+elasticsearch+master+release-tests build #289).
So the problem is that 6.0.2, 6.1.0, 6.2.0 were considered unreleased at that point in time (the version 6.1.0 is already released but by the time the build ran, the Versions.java has not yet been adjusted) but still appeared as released.