Skip to content

NIFI-10774 fix flaky tests in TestGetHDFSFileInfo#6629

Closed
YiweiLi4 wants to merge 2 commits intoapache:mainfrom
YiweiLi4:fix_tests
Closed

NIFI-10774 fix flaky tests in TestGetHDFSFileInfo#6629
YiweiLi4 wants to merge 2 commits intoapache:mainfrom
YiweiLi4:fix_tests

Conversation

@YiweiLi4
Copy link

@YiweiLi4 YiweiLi4 commented Nov 7, 2022

Summary

NIFI-10774
testRecursiveGroupAllToAttributes is detected flaky by Nondex since the attribute "hdfs.full.tree" is a JSON Object and is not always written in a deterministic order. Instead of comparing the string of the attribute and the expected one, I used jsonassert to compare the two JSON objects.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 8
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@exceptionfactory exceptionfactory added the type: testing Pull requests for changes to test components label Nov 23, 2022
Copy link
Contributor

@pvillard31 pvillard31 left a comment

Choose a reason for hiding this comment

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

I'd try to achieve the same without introducing an additional dependency. Or at the very least, change the scope of the dependency for testing only.

@exceptionfactory
Copy link
Contributor

@YiweiLi4 Thanks for the contribution, as previously these test changes should be implemented without the additional dependency. I am closing this pull request for now, but feel free to follow up after making the requested changes when you are ready for further review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: testing Pull requests for changes to test components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants