Repository navigation
Migrate the SSOTest - #48367
Migrate the SSOTest#48367
Conversation
Unreported flaky test detectedIf 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.model.singleUseObject.SingleUseObjectModelTest#testClusterKeycloak CI - Store Model Tests org.keycloak.testsuite.model.user.UserModelTest#testAddRemoveUserConcurrentKeycloak CI - Store Model Tests |
There was a problem hiding this comment.
Thanks @msdaly200! Please remove the old test, this way we can check the differences. Review is difficult without differences. 😄
Remember that, when you move a database test, you need to add the annotation @DatabaseTest to the test. You can also add to specific tests if you don't want all the class to be executed in the database flow, this way only a the annotated tests will be there. Your test should be also executed in the DB jobs (postgresql, mariadb, oracle,...).
Unreported flaky test detectedIf 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.authz.PolicyEvaluationTest# |
9b1dcc5 to
93f65b6
Compare
There was a problem hiding this comment.
This is a pretty big PR with lots of changes. Please next time try to reduce the AI generated noise, at least for the comments. Thank you for the contribution @msdaly200
|
Thanks @vaceksimon and @rmartinc for all your comments, much appreciated. |
|
@vaceksimon @rmartinc Assuming testsuite/integration-arquillian/tests/base/testsuites/database-suite needs updated too...ie ssotest removed? |
ece5fac to
7f79a5f
Compare
Unreported flaky test detectedIf 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.adapter.servlet.SAMLServletAdapterTest#salesPostEmptyConsumerPostURLKeycloak CI - Adapter IT Strict Cookies org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#salesPostSigTestKeycloak CI - Adapter IT Strict Cookies org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#disabledClientTestKeycloak CI - Adapter IT Strict Cookies |
089fa01 to
01936a0
Compare
There was a problem hiding this comment.
Thanks @msdaly200! Just three minor things and I think that this is OK. Let's see if we don't forget to remove/add the test somewhere. 😄
There was a problem hiding this comment.
Found a few more things. I think we'll be finished with the next one. Thanks @msdaly200
| // Poll both password update events (order may vary due to identical timestamps) | ||
| EventRepresentation event1 = events.poll(); | ||
| EventRepresentation event2 = events.poll(); | ||
|
|
||
| EventRepresentation updatePasswordEvent; | ||
| EventRepresentation updateCredentialEvent; | ||
|
|
||
| if (EventType.UPDATE_PASSWORD == EventType.valueOf(event1.getType())) { | ||
| updatePasswordEvent = event1; | ||
| updateCredentialEvent = event2; | ||
| } else { | ||
| updatePasswordEvent = event2; | ||
| updateCredentialEvent = event1; | ||
| } | ||
|
|
||
| EventAssertion.assertSuccess(updatePasswordEvent) | ||
| .type(EventType.UPDATE_PASSWORD) | ||
| .details(Details.CREDENTIAL_TYPE, PasswordCredentialModel.TYPE); | ||
|
|
||
| EventAssertion.assertSuccess(updateCredentialEvent) | ||
| .type(EventType.UPDATE_CREDENTIAL) | ||
| .details(Details.CREDENTIAL_TYPE, PasswordCredentialModel.TYPE); |
There was a problem hiding this comment.
I think what the comment states is wrong
// Poll both password update events (order may vary due to identical timestamps)
Perhaps adding the driver.waiting().waitForOAuthCallback() call solved the issue. I tried running this version and the events were asserted in the correct order each time.
| // Poll both password update events (order may vary due to identical timestamps) | |
| EventRepresentation event1 = events.poll(); | |
| EventRepresentation event2 = events.poll(); | |
| EventRepresentation updatePasswordEvent; | |
| EventRepresentation updateCredentialEvent; | |
| if (EventType.UPDATE_PASSWORD == EventType.valueOf(event1.getType())) { | |
| updatePasswordEvent = event1; | |
| updateCredentialEvent = event2; | |
| } else { | |
| updatePasswordEvent = event2; | |
| updateCredentialEvent = event1; | |
| } | |
| EventAssertion.assertSuccess(updatePasswordEvent) | |
| .type(EventType.UPDATE_PASSWORD) | |
| .details(Details.CREDENTIAL_TYPE, PasswordCredentialModel.TYPE); | |
| EventAssertion.assertSuccess(updateCredentialEvent) | |
| .type(EventType.UPDATE_CREDENTIAL) | |
| .details(Details.CREDENTIAL_TYPE, PasswordCredentialModel.TYPE); | |
| EventAssertion.assertSuccess(events.poll()) | |
| .type(EventType.UPDATE_PASSWORD) | |
| .details(Details.CREDENTIAL_TYPE, PasswordCredentialModel.TYPE); | |
| EventAssertion.assertSuccess(events.poll()) | |
| .type(EventType.UPDATE_CREDENTIAL) | |
| .details(Details.CREDENTIAL_TYPE, PasswordCredentialModel.TYPE); | |
There was a problem hiding this comment.
Thanks Simon for all the comments - I added this because it was failing for the MySQL build, so locally this works fine - events always come back in the expected way, but not for MySQL.
6cd0845 to
1da5ea6
Compare
Signed-off-by: Marie Daly <marie.daly1@ibm.com>
Signed-off-by: Marie Daly <marie.daly1@ibm.com>
Signed-off-by: Marie Daly <marie.daly1@ibm.com>
|
Hi @vaceksimon and @rmartinc again thanks for your hard work in reviewing this file. I added more commits again, from a different branch in an attempt to keep git history. So the main code hasn't changed. Can you review/approve when you get a chance? |
There was a problem hiding this comment.
Thanks for the great work @msdaly200!
There was a problem hiding this comment.
Thanks a lot @msdaly200! LGTM too!
Closes #48153
Migrate the SSOTest