[FEATURE REQUEST] Refactor usage of DropwizardAppExtension in the tests for PolarisApplication to maximize the reuse
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 522
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 137
Description
### Is your feature request related to a problem? Please describe.
There are a lot of tests uses DropwizardAppExtension to init a PolarisApplication, for example:
```
private static final DropwizardAppExtension EXT =
new DropwizardAppExtension<>(
PolarisApplication.class,
ResourceHelpers.resourceFilePath("polaris-server-integrationtest.yml"),
// Bind to random port to support parallelism
ConfigOverride.config("server.applicationConnectors[0].port", "0"),
ConfigOverride.config("server.adminConnectors[0].port", "0"),
// Block overlapping catalog paths:
ConfigOverride.config("featureConfiguration.ALLOW_OVERLAPPING_CATALOG_URLS", "false"));
```
in PolarisOverlappingCatalogTest.java.
### Describe the solution you'd like
We can refactor the usaage as a util function or base class for maximize reuse.
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start with PolarisOverlappingCatalogTest.java and its DropwizardAppExtension setup, then search the PolarisApplication tests for similar initialization. Compare the repeated configuration before choosing a reusable utility function or base class. Done means the duplicated setup is consolidated and the affected tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100