feat: improve context API and tester scanning#62
Open
mcollovati wants to merge 4 commits into
Open
Conversation
Contributor
Author
ffcb8f2 to
e7a59c9
Compare
3c0a746 to
568bd46
Compare
The multi-user context factory exposed the internal `Routes` type and offered no way to scan custom component testers. The Spring and Quarkus factories carried the same `Routes` leak. Public factories now take view packages or view classes directly, and the builder exposes `withComponentTesterPackages(...)` for registering custom testers when creating an application context. Closes #61
568bd46 to
5ea90f9
Compare
Public `BrowserlessApplicationContext.create(Routes)` and the package-private `Builder(Routes)` constructor were leaking the internal `Routes` type into tests, even though `RouteDiscovery` now caches discovered routes per package process-wide, so sharing a `Routes` instance across contexts is no longer a useful optimization. Remove `create(Routes)` from the public API and migrate the 23 affected junit6 call sites to `create(<View>.class)`, `create(UnaryOperator)`, or `createSecured(...)` as appropriate. `BrowserlessClosePathCleanupTest` collapses its six repeating `createSecured(...)` lambdas into a `securedAppFor(handler)` helper. `Builder(Routes)` stays package-private for the shared/ Builder-contract tests that exercise it directly. Also fix a stale Javadoc reference to `BrowserlessApplicationContext#builder(Routes)`. Part of #61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The multi-user context factory exposed the internal
Routestype and offered no way to scan custom component testers. The Spring and Quarkus factories carried the sameRoutesleak.Public factories now take view packages or view classes directly, and the builder exposes
withComponentTesterPackages(...)for registering custom testers when creating an application context.Closes #61