-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add support to select supplier for a given type #31292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7e26283 to
d258379
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporary until we have Smallrye config stuff in place, but this let's you define the supplier using system property, environment variable, or in .env file.
Example of the last one:
# cat ./test-poc/base/.env
KC_TEST_BROWSER=firefox
KC_TEST_SERVER=remote
| Set<Supplier> skippedSuppliers = new HashSet<>(); | ||
|
|
||
| while (supplierIterator.hasNext()) { | ||
| Supplier supplier = supplierIterator.next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supplier.getValueType() is called 4 times in this loop, perhaps re-use it in a variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
| shouldAdd = true; | ||
| } | ||
| } else { | ||
| shouldAdd = !loadedValueTypes.contains(supplier.getValueType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is always true, as it matches the condition of the if it is contained in.
| shouldAdd = !loadedValueTypes.contains(supplier.getValueType()); | |
| shouldAdd = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
d258379 to
de1e1c5
Compare
de1e1c5 to
32f3eb3
Compare
|
|
||
| private static final Map<Class, String> aliases = Map.of( | ||
| WebDriver.class, "browser", | ||
| KeycloakTestServer.class, "server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stianst Since TestDatabase is merged, I propose to rebase it and add a database support here as well with particular aliases. WDYT?
Closes keycloak#30609 Signed-off-by: stianst <[email protected]>
32f3eb3 to
49e5cf9
Compare
lhanusov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you Stian for updating the code, LGTM 👍
Closes keycloak#30609 Signed-off-by: stianst <[email protected]>
Few things related to this:
Closes #30609
Signed-off-by: stianst [email protected]