diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseChecker.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseChecker.java index 3a0c36a62592a..4e6355ee5d27c 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseChecker.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseChecker.java @@ -170,7 +170,7 @@ public static String buildErrorMessage(RemoteClusterLicenseInfo clusterLicenseIn License.OperationMode mode = License.OperationMode.resolve(clusterLicenseInfo.licenseInfo.getMode()); if (mode != License.OperationMode.PLATINUM && mode != License.OperationMode.TRIAL) { error.append("The license mode [").append(mode) - .append("] on cluster [").append(mode) + .append("] on cluster [") .append(clusterLicenseInfo.clusterName) .append("] does not enable Machine Learning. "); } diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseCheckerTests.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseCheckerTests.java index f6785a8494a84..153d5654a269c 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseCheckerTests.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/datafeed/MlRemoteLicenseCheckerTests.java @@ -155,7 +155,7 @@ public void testBuildErrorMessage() { XPackInfoResponse.LicenseInfo basicLicense = createBasicLicenseResponse(); info = new MlRemoteLicenseChecker.RemoteClusterLicenseInfo("basic-cluster", basicLicense); - String expected = "The license mode on cluster [basic-cluster] with mode [BASIC] does not enable Machine Learning. " + String expected = "The license mode [BASIC] on cluster [basic-cluster] does not enable Machine Learning. " + Strings.toString(basicLicense); assertEquals(expected, MlRemoteLicenseChecker.buildErrorMessage(info));