-
Notifications
You must be signed in to change notification settings - Fork 585
4.x: Enable microprofile/tests/tck/tck-config/src/test/tck-suite.xml tests #8173
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
base: main
Are you sure you want to change the base?
Conversation
146f4fb to
82c58c7
Compare
…tests helidon-io#8173 Signed-off-by: Jorge Bescos Gascon <[email protected]>
| } catch (NoSuchElementException e) { | ||
| // Property expression does not resolve | ||
| return Optional.empty(); | ||
| return Optional.of(new ConfigValueImpl(propName, null, rawValue, name, ordinal)); |
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 the point 1 I was referring before.
| } | ||
|
|
||
| private Optional<ConfigValue> findConfigValue(String propertyName) { | ||
| private Optional<ConfigValue> findConfigValue(String propertyName, Optional<String> profiledPropertyName) { |
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.
we do not use optional parameters. Also it does not make sense in this case, as you wrap it just to unwrap it later. Please use null here, as it is a private method (null is not allowed in public API only).
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.
Done
| String rawValue = value; | ||
| String name = source.getName(); | ||
| int ordinal = source.getOrdinal(); | ||
| final String propName = selectedProperty; |
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 name is not descriptive. Use selectedPropertyFinal or something similar, with a comment "required final variable, as it is used in lambdas"
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.
Done
| @SuppressWarnings("unchecked") | ||
| @Override | ||
| public <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType) { | ||
| String profiledPropertyName = null; |
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 statement does not make sense here - the next if is checking for profile being null. So just move the content of the if statement after the if checking if profile is null and remove the check.
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.
Done
config/config-mp/src/main/java/io/helidon/config/mp/MpConfigImpl.java
Outdated
Show resolved
Hide resolved
6dc63dd to
325790c
Compare
|
@tomas-langer kindly reminder to review this. |
|
After merging main I found out this already sort out the problems: |
|
@tomas-langer please review/approve this so I can run TCKs with Java 24 with this test too. |
microprofile/tests/server/pom.xml
Outdated
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| <build> |
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 change does not seem to be required for the described problem. This is tests/server, not TCK
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.
I don't remember the context of this. Probably it was necessary at some point when this PR had other changes. It is removed now.
|
Please |
tomas-langer
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.
PR should be probably reworked on main branch and just do the one change that is left.
We must rebase, not merge with main
…tests helidon-io#8173 Signed-off-by: Jorge Bescos Gascon <[email protected]>
I like merges because it is less work, but I have re-based it following your indications. Let me know if you prefer that I make a new PR with the only single file that needs to be changed and we close this one. |
|
Now TCK is failing. Probably something in code has changed since I created this PR. I will need to check it again. |
|
It is passing in my computer |
|
Issue here is the next. It looks there are two #computeIfAbsent within the same stack: |
…tests helidon-io#8173 Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
|
@tomas-langer it is passing now |
#6105
Description
We were waiting for microprofile-config 3.1 to enable one test. This version made other issues that are fixed in this PR too.
There were 2 types of issues:
Documentation
N/A