diff --git a/data/src/main/java/com/microsoft/azure/kusto/data/auth/CloudInfo.java b/data/src/main/java/com/microsoft/azure/kusto/data/auth/CloudInfo.java index fd69babd..ea1a3aa2 100644 --- a/data/src/main/java/com/microsoft/azure/kusto/data/auth/CloudInfo.java +++ b/data/src/main/java/com/microsoft/azure/kusto/data/auth/CloudInfo.java @@ -127,7 +127,8 @@ private static CloudInfo fetchImpl(String clusterUrl, @Nullable HttpClient given CloudInfo result; HttpClient localHttpClient = givenHttpClient == null ? HttpClientFactory.create(null) : givenHttpClient; try { - HttpRequest request = new HttpRequest(HttpMethod.GET, UriUtils.appendPathToUri(clusterUrl, METADATA_ENDPOINT)); + // Metadata endpoint is always on the root of the cluster + HttpRequest request = new HttpRequest(HttpMethod.GET, UriUtils.setPathForUri(clusterUrl, METADATA_ENDPOINT)); request.setHeader(HttpHeaderName.ACCEPT_ENCODING, "gzip,deflate"); request.setHeader(HttpHeaderName.ACCEPT, "application/json"); diff --git a/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java b/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java index 06c01528..63b6d347 100644 --- a/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java +++ b/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java @@ -677,6 +677,7 @@ void testSameHttpClientInstance() throws DataClientException, DataServiceExcepti } + @Disabled("This test is disabled because it relies on the path part of the cluster Uri which we now ignore") @Test void testNoRedirectsCloudFail() { KustoTrustedEndpoints.addTrustedHosts(Collections.singletonList(new MatchRule("statusreturner.azurewebsites.net", false)), false);