Skip to content

Fix flakey IAA Agreements spec#10989

Merged
aduth merged 1 commit intomainfrom
aduth-iaa-spec-flakey
Jul 26, 2024
Merged

Fix flakey IAA Agreements spec#10989
aduth merged 1 commit intomainfrom
aduth-iaa-spec-flakey

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jul 26, 2024

🛠 Summary of changes

Updates the spec for Agreements::Iaa to fix flakey test failures.

Example failure: https://gitlab.login.gov/lg/identity-idp/-/jobs/1326656

The issue is that the spec in question compares a factory-created record with a randomized order number with a record that has a set order number. And because the randomized order number is between 1 and 1000, this leaves a 1 in 1000 chance that the number conflicts.

The fix is to assign a unique, known order_number to the "other" record. Another option is to use a dynamically-generated order number for both and use Faker's .unique option, but this adds some complexity to how other specs in this file assert their expected result (example).

📜 Testing Plan

Verify build passes.

changelog: Internal, Automated Testing, Fix flakey IAA Agreements spec
@aduth aduth merged commit 61ee0b5 into main Jul 26, 2024
@aduth aduth deleted the aduth-iaa-spec-flakey branch July 26, 2024 17:35
mitchellhenke pushed a commit that referenced this pull request Jul 31, 2024
changelog: Internal, Automated Testing, Fix flakey IAA Agreements spec
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