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 test parseManyAliasesForCollections #127

Merged
merged 4 commits into from
Jan 21, 2024

Conversation

aSemy
Copy link
Collaborator

@aSemy aSemy commented Jan 21, 2024

I think the test is failing on CI because the test is performing worse than expected.

Example failure:

ReferencesTest[jvm] > Parsing with aliases may take a lot of time, CPU and memory[jvm] FAILED
    org.opentest4j.AssertionFailedError: Time was 11.039 seconds. ==> expected: <true> but was: <false>
        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
        at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
        at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
        at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
        at app//org.snakeyaml.engine.usecases.references.ReferencesTest.parseManyAliasesForCollections(ReferencesTest.java:113)
  • Remove the num-of-cores logic regarding minDuration - 400ms seems fine.
  • Increase max duration to 15 seconds - the exact timeout doesn't particularly matter, this test is always going to be slow.
  • replace manual time measurement with Java 8 time utils
  • add a JUnit timeout assertion

aSemy added 2 commits January 21, 2024 18:06
* Decrease minDuration - 700ms for slower cores seems too slow.
* replace manual time measurement with Java 8 time utils
* add a JUnit timeout assertion
@aSemy aSemy mentioned this pull request Jan 21, 2024
@aSemy aSemy merged commit 635f1e4 into main Jan 21, 2024
4 checks passed
@aSemy aSemy deleted the fix/test_parseManyAliasesForCollections_minDuration branch January 21, 2024 17:38
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.

2 participants