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

Ignore file order in test assertion #1755

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

andrross
Copy link
Member

Description

This unit test asserts that a SHA file for a groovy dependency gets
created. However, a SHA file for javaparser-core also gets created in
the same directory. For some reason, builds were failing on my machine
because Files::list was returning the javaparser-core file first. I
don't believe there are any ordering guarantees with that API, so I
relaxed the assertion to not depend on ordering.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@andrross andrross requested a review from a team as a code owner December 16, 2021 23:35
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure bd745b7de1691c3f2eb1225516bfdfbae3ddff39
Log 1551

Reports 1551

This unit test asserts that a SHA file for a groovy dependency gets
created. However, a SHA file for javaparser-core also gets created in
the same directory. For some reason, builds were failing on my machine
because `Files::list` was returning the javaparser-core file first. I
don't believe there are any ordering guarantees with that API, so I
relaxed the assertion to not depend on ordering.

Signed-off-by: Andrew Ross <andrross@amazon.com>
@andrross andrross force-pushed the update-shas-task-test branch from bd745b7 to 7e0fa7d Compare December 16, 2021 23:44
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 7e0fa7d
Log 1553

Reports 1553

@andrross andrross self-assigned this Dec 17, 2021
@dblock dblock merged commit ca40ba9 into opensearch-project:main Dec 20, 2021
@dblock dblock added backport 1.x pending backport Identifies an issue or PR that still needs to be backported labels Dec 20, 2021
andrross added a commit to andrross/OpenSearch that referenced this pull request Dec 21, 2021
This unit test asserts that a SHA file for a groovy dependency gets
created. However, a SHA file for javaparser-core also gets created in
the same directory. For some reason, builds were failing on my machine
because `Files::list` was returning the javaparser-core file first. I
don't believe there are any ordering guarantees with that API, so I
relaxed the assertion to not depend on ordering.

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross added a commit that referenced this pull request Dec 21, 2021
This unit test asserts that a SHA file for a groovy dependency gets
created. However, a SHA file for javaparser-core also gets created in
the same directory. For some reason, builds were failing on my machine
because `Files::list` was returning the javaparser-core file first. I
don't believe there are any ordering guarantees with that API, so I
relaxed the assertion to not depend on ordering.

Signed-off-by: Andrew Ross <andrross@amazon.com>
@andrross andrross deleted the update-shas-task-test branch December 21, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x pending backport Identifies an issue or PR that still needs to be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants