ElasticVersion: Say 'Unsupported' rather than 'Invalid'

If a version number is not recognized, it is not necessarily invalid,
but could just be because we didn't yet add support for it.

Change the error message to be less aggressive.

Change-Id: I904ff165b7e04ae0c5e7514923a75f6a74e8b005
This commit is contained in:
David Pursehouse
2018-09-04 10:01:22 +09:00
parent 088f2d438a
commit 0753f99d13
2 changed files with 7 additions and 7 deletions

View File

@@ -41,9 +41,9 @@ public class ElasticVersionTest {
@Test
public void unsupportedVersion() throws Exception {
exception.expect(ElasticVersion.InvalidVersion.class);
exception.expect(ElasticVersion.UnsupportedVersion.class);
exception.expectMessage(
"Invalid version: [4.0.0]. Supported versions: " + ElasticVersion.supportedVersions());
"Unsupported version: [4.0.0]. Supported versions: " + ElasticVersion.supportedVersions());
ElasticVersion.forVersion("4.0.0");
}