Skip to content

Commit cbd81a9

Browse files
committed
rever unintended
1 parent 229eb63 commit cbd81a9

File tree

3 files changed

+9
-26
lines changed

3 files changed

+9
-26
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private void tryResolveHostMetadata() {
245245
}
246246
try {
247247
resolveHostMetadata();
248-
} catch (Throwable e) {
248+
} catch (Exception e) {
249249
LOG.warn("Failed to resolve host metadata: {}. Falling back to user config.", e.getMessage());
250250
}
251251
}

databricks-sdk-java/src/test/java/com/databricks/sdk/core/oauth/ExternalBrowserCredentialsProviderTest.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ void clientAndConsentTest() throws IOException {
3434
"{\"token_endpoint\": \"tokenEndPointFromServer\", \"authorization_endpoint\": \"authEndPointFromServer\"}",
3535
200)
3636
.build();
37-
FixtureServer.FixtureMapping wellKnownFixture =
38-
new FixtureServer.FixtureMapping.Builder()
39-
.validateMethod("GET")
40-
.validatePath("/.well-known/databricks-config")
41-
.withResponse("{}", 404)
42-
.build();
4337
try (FixtureServer fixtures = new FixtureServer()) {
44-
fixtures.with(wellKnownFixture).with(fixture).with(fixture);
38+
fixtures.with(fixture).with(fixture);
4539
DatabricksConfig config =
4640
new DatabricksConfig()
4741
.setAuthType("external-browser")
@@ -87,14 +81,8 @@ void clientAndConsentTestWithCustomRedirectUrl() throws IOException {
8781
"{\"token_endpoint\": \"tokenEndPointFromServer\", \"authorization_endpoint\": \"authEndPointFromServer\"}",
8882
200)
8983
.build();
90-
FixtureServer.FixtureMapping wellKnownFixture =
91-
new FixtureServer.FixtureMapping.Builder()
92-
.validateMethod("GET")
93-
.validatePath("/.well-known/databricks-config")
94-
.withResponse("{}", 404)
95-
.build();
9684
try (FixtureServer fixtures = new FixtureServer()) {
97-
fixtures.with(wellKnownFixture).with(fixture).with(fixture);
85+
fixtures.with(fixture).with(fixture);
9886
DatabricksConfig config =
9987
new DatabricksConfig()
10088
.setAuthType("external-browser")
@@ -138,7 +126,9 @@ void openIDConnectEndPointsTestAccounts() throws IOException {
138126
new DatabricksConfig()
139127
.setAuthType("external-browser")
140128
.setHost("https://accounts.cloud.databricks.com")
129+
.setHttpClient(new CommonsHttpClient.Builder().withTimeoutSeconds(30).build())
141130
.setAccountId("testAccountId");
131+
config.resolve();
142132

143133
String prefix = "https://accounts.cloud.databricks.com/oidc/accounts/" + config.getAccountId();
144134
assertEquals(prefix + "/v1/token", config.getDatabricksOidcEndpoints().getTokenEndpoint());

databricks-sdk-java/src/test/java/com/databricks/sdk/service/gentesting/unittests/IdempotencyTestingAPITest.java

Lines changed: 4 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)