File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
server/src/test/java/org/elasticsearch/action/search Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -273,18 +273,22 @@ public void testMinimumVersionSameAsNewVersion() {
273273 }
274274
275275 public void testMinimumVersionBetweenNewAndOldVersion () {
276- var oldVersion = new VersionInformation (
277- VersionUtils .getFirstVersion (),
278- IndexVersions .MINIMUM_COMPATIBLE ,
279- IndexVersionUtils .randomCompatibleVersion (random ())
280- );
281-
282276 var newVersion = new VersionInformation (
283277 VersionUtils .maxCompatibleVersion (VersionUtils .getFirstVersion ()),
284278 IndexVersions .MINIMUM_COMPATIBLE ,
285279 IndexVersion .current ()
286280 );
287281
282+ var oldVersion = new VersionInformation (
283+ VersionUtils .randomVersionBetween (
284+ random (),
285+ Version .CURRENT .minimumCompatibilityVersion (),
286+ VersionUtils .getPreviousVersion (newVersion .nodeVersion ())
287+ ),
288+ IndexVersions .MINIMUM_COMPATIBLE ,
289+ IndexVersionUtils .randomCompatibleVersion (random ())
290+ );
291+
288292 var minVersion = VersionUtils .randomVersionBetween (
289293 random (),
290294 allVersions ().get (allVersions ().indexOf (oldVersion .nodeVersion ()) + 1 ),
You can’t perform that action at this time.
0 commit comments