Commit dd52cc5
Add configurable OAuthWebServerTimeout connection property (#1226)
## Summary
- Adds a new `OAuthWebServerTimeout` connection property to configure
the OAuth browser authentication timeout for U2M (user-to-machine) flows
- Replaces the hardcoded 1-hour timeout in
`ClientConfigurator.setupU2MConfig()` with the configurable value
- Default is **120 seconds**, matching Simba driver parity
## Changes
| File | Change |
|------|--------|
| `DatabricksJdbcUrlParams.java` | New `OAUTH_WEB_SERVER_TIMEOUT` enum
entry (default: `"120"`) |
| `IDatabricksConnectionContext.java` | Added
`getOAuthWebServerTimeout()` interface method |
| `DatabricksConnectionContext.java` | Implemented the getter |
| `ClientConfigurator.java` | Replaced `Duration.ofHours(1)` with
`Duration.ofSeconds(connectionContext.getOAuthWebServerTimeout())` |
| `DatabricksConnectionContextTest.java` | Tests for default (120) and
custom (300) values |
| `ClientConfiguratorTest.java` | Updated 9 browser auth tests to mock
the new method |
## Test plan
- [x] `DatabricksConnectionContextTest#testOAuthWebServerTimeoutDefault`
— verifies default 120s
- [x] `DatabricksConnectionContextTest#testOAuthWebServerTimeoutCustom`
— verifies custom value via URL param
- [x] All 25 `ClientConfiguratorTest` tests pass with the configurable
timeout wired through
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 40efd22 commit dd52cc5
7 files changed
Lines changed: 38 additions & 2 deletions
File tree
- src
- main/java/com/databricks/jdbc
- api
- impl
- internal
- common
- dbclient/impl/common
- test/java/com/databricks/jdbc
- api/impl
- dbclient/impl/common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
813 | 819 | | |
814 | 820 | | |
815 | 821 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1345 | 1360 | | |
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
| 251 | + | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
| |||
491 | 494 | | |
492 | 495 | | |
493 | 496 | | |
| 497 | + | |
494 | 498 | | |
495 | 499 | | |
496 | 500 | | |
| |||
501 | 505 | | |
502 | 506 | | |
503 | 507 | | |
504 | | - | |
| 508 | + | |
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
| |||
522 | 526 | | |
523 | 527 | | |
524 | 528 | | |
| 529 | + | |
525 | 530 | | |
526 | 531 | | |
527 | 532 | | |
| |||
556 | 561 | | |
557 | 562 | | |
558 | 563 | | |
| 564 | + | |
559 | 565 | | |
560 | 566 | | |
561 | 567 | | |
| |||
575 | 581 | | |
576 | 582 | | |
577 | 583 | | |
| 584 | + | |
578 | 585 | | |
579 | 586 | | |
580 | 587 | | |
| |||
686 | 693 | | |
687 | 694 | | |
688 | 695 | | |
| 696 | + | |
689 | 697 | | |
690 | 698 | | |
691 | 699 | | |
| |||
710 | 718 | | |
711 | 719 | | |
712 | 720 | | |
| 721 | + | |
713 | 722 | | |
714 | 723 | | |
715 | 724 | | |
| |||
0 commit comments