8000 fix: remove erroneous spi warnings by shawkins · Pull Request #33648 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: remove erroneous spi warnings #33648

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

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

shawkins
Copy link
Contributor
@shawkins shawkins commented Oct 7, 2024

closes: #34057

Follow up to #33638 to make all sys out unit testable. There are a couple of changes for this:

  • switch from using a logger to the picocli out for warnings. Usage of the logger was a little problematic in any case, and this makes sure that warnings are emitted the same way as other cli time output, including help. Some coloring was added for the WARNING: prefix, but can be tweaked / removed if anyone objects.
  • rather than using a boolean flag, fully encapsulate quarkus callouts on the Picocli class and inject the instance when commands are created.

The changes to capture the out output means we could do the help tests in this manner as well.

@shawkins
Copy link
Contributor Author

Opened #33977 to expedite the fix.

@shawkins shawkins marked this pull request as ready for review October 16, 2024 16:04
closes: keycloak#34057

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Copy link
@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.broker.KcOidcBrokerTest#testPostBrokerLoginFlowWithOTP_bruteForceEnabled

Keycloak CI - Java Distribution IT (windows-latest - temurin - 17)

java.lang.AssertionError: Did not find the event of expected type USER_DISABLED_BY_TEMPORARY_LOCKOUT. Events present: [IDENTITY_PROVIDER_POST_LOGIN_ERROR, IDENTITY_PROVIDER_POST_LOGIN_ERROR, IDENTITY_PROVIDER_POST_LOGIN_ERROR, IDENTITY_PROVIDER_POST_LOGIN_ERROR]
	at org.junit.Assert.fail(Assert.java:89)
	at org.keycloak.testsuite.AssertEvents$ExpectedEvent.assertEvent(AssertEvents.java:410)
	at org.keycloak.testsuite.broker.AbstractAdvancedBrokerTest.testPostBrokerLoginFlowWithOTP_bruteForceEnabled(AbstractAdvancedBrokerTest.java:586)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

Report flaky test

Copy link
Contributor
@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@vmuzikar vmuzikar merged commit 1d38fa8 into keycloak:main Oct 21, 2024
74 checks passed
Petar-CV pushed a commit to Petar-CV/keycloak that referenced this pull request Oct 25, 2024
closes: keycloak#34057

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PicoCli unit testing should support sys out capture
2 participants
0