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

WFLY-18823 Fix Flaky AbstractValidationUnitTest #17472

Merged
merged 1 commit into from Dec 7, 2023
Merged

WFLY-18823 Fix Flaky AbstractValidationUnitTest #17472

merged 1 commit into from Dec 7, 2023

Conversation

alexbadia1
Copy link
Contributor

Fixes: https://issues.redhat.com/browse/WFLY-18823

In AbstractValidationUnitTes list schema files in a deterministic order and preserve order with LinkedHashMaps for JBOSS_SCHEMAS_MAP and CURRENT_JBOSS_SCHEMAS_MAP

…der with LinkedHashMaps for JBOSS_SCHEMAS_MAP and CURRENT_JBOSS_SCHEMAS_MAP
@wildfly-ci
Copy link

Hello, alexbadia1. I'm waiting for one of the admins to verify this patch with /ok-to-test in a comment.

@bstansberry
Copy link
Contributor

/ok-to-test

@@ -152,6 +154,7 @@ public class AbstractValidationUnitTest {
final File schemaDir = new File(JBOSS_DIST_DIR, SCHEMAS_LOCATION);

final File[] xsds = schemaDir.listFiles(new SchemaFilter(EXCLUDED_SCHEMA_FILES.toArray(new String[0])));
Arrays.sort(xsds);
Copy link
Contributor

Choose a reason for hiding this comment

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

@alexbadia1 How does this address the JIRA description statement that:

"the order of the SCHEMA_SOURCES matters since some schemas may be dependent on each other, (i.e. one schema importing another)" ?

It makes the order deterministic, but I'm not sure why lexicographical ordering of path names results in avoiding incorrect orders between dependent schemas.

I think your PR's fine; being deterministic is good, and if it passes we know the lexicographical sort order is an ok one to stick to.

@bstansberry bstansberry merged commit 461d26f into wildfly:main Dec 7, 2023
13 checks passed
@bstansberry
Copy link
Contributor

Thanks @alexbadia1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants