Skip to content
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

Fix SCIM custom claim dialect related test issue #21294

Merged

Conversation

PasinduYeshan
Copy link
Contributor

@PasinduYeshan PasinduYeshan commented Oct 8, 2024

Fix:
The SCIM2CustomSchemaUserTestCase.createClaims() test is failing with a NoSuchMethodError:

[ERROR] org.wso2.identity.integration.test.scim2.rest.api.customSchema.SCIM2CustomSchemaUserTestCase.createClaims(org.wso2.identity.integration.test.scim2.rest.api.customSchema.SCIM2CustomSchemaUserTestCase)
[ERROR] Run 1: SCIM2CustomSchemaUserTestCase.createClaims:153 » NoSuchMethod org.wso2.carbon....
[ERROR] Run 2: SCIM2CustomSchemaUserTestCase.createClaims:153 » NoSuchMethod org.wso2.carbon....

Root Cause

This error is occurring due to changes introduced in PR #5661 (wso2/carbon-identity-framework#5661). That PR added claims to the "urn:scim:wso2:schema" dialect by default. However, the SCIM2CustomSchemaUserTestCase assumes this custom dialect URI is not set and attempts to create the claim dialect within the test.

Solution

Updated test to, check if custom schema dialect exists and create dialect only if it doesn't exist.

is-tests-scim2 tests passed locally with this change.
image

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11242508191

@PasinduYeshan PasinduYeshan mentioned this pull request Oct 8, 2024
@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11242508191
Status: success

Copy link
Contributor

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11242508191

@ashensw
Copy link
Contributor

ashensw commented Oct 9, 2024

@PasinduYeshan Any idea why it was giving the error as NoSuchMethod, which seems a bit confusing?

@PasinduYeshan
Copy link
Contributor Author

Any idea why it was giving the error as NoSuchMethod, which seems a bit confusing?

After analyzing the bytecode, it looks like the error is actually coming from the error handling code itself, specifically this line:
Object messageObject = this.fromOM(faultElt, messageClass, (Map)null);

Problem is likely related to deserializing the SOAP fault response, rather than the main method call.

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11248209819

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11248209819
Status: cancelled

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11252061085

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11252061085
Status: success

Copy link
Contributor

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11252061085

@PasinduYeshan PasinduYeshan merged commit 4731cc4 into wso2:master Oct 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants