Skip to content

Commit

Permalink
Fix NodeEnvironmentIT
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrandolph committed Nov 14, 2023
1 parent efe2119 commit 65dd91a
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

package org.elasticsearch.env;

import org.elasticsearch.Build;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.common.settings.Settings;
Expand Down Expand Up @@ -126,7 +125,7 @@ public void testFailsToStartIfDowngraded() {
);
assertThat(
illegalStateException.getMessage(),
allOf(startsWith("cannot downgrade a node from version ["), endsWith("] to version [" + Build.current().version() + "]"))
allOf(startsWith("cannot downgrade a node from version ["), endsWith("] to version [" + NodeMetadataVersion.current() + "]"))
);
}

Expand All @@ -137,12 +136,12 @@ public void testFailsToStartIfUpgradedTooFar() {
assertThat(
illegalStateException.getMessage(),
allOf(
startsWith("cannot upgrade a node from version ["),
startsWith("cannot upgrade a node with metadata version ["),
endsWith(
"] directly to version ["
+ Build.current().version()
+ "], upgrade to version ["
+ Build.current().minWireCompatVersion()
"] directly to metadata version ["
+ NodeMetadataVersion.current()
+ "], upgrade to metadata version ["
+ NodeMetadataVersion.MINIMUM_COMPATIBLE
+ "] first."
)
)
Expand Down

0 comments on commit 65dd91a

Please sign in to comment.