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

Refactor Serial Tests pt1 #1690

Open
4 tasks
k-macmillan opened this issue Mar 15, 2024 · 0 comments
Open
4 tasks

Refactor Serial Tests pt1 #1690

k-macmillan opened this issue Mar 15, 2024 · 0 comments
Labels

Comments

@k-macmillan
Copy link

k-macmillan commented Mar 15, 2024

User Story - Business Need

Some tests require serial execution due to the called functions operating on more than what the test has control over. These are usually valuable integration tests with the database; we do not want to remove them.

Other tests marked serial could be refactored to not be dependent on serial execution. Here are some of the reasons a test may have been marked serial:

  • The reusable fixture uses hardcoded references
  • Multiple rows being found when one was expected
  • Test does not make good use of freezetime

Update all non-dao tests that must remain serial with a comment: # requires serial execution - <method_name>, where <method_name> is the method within the test that requires serial execution. These should only be due to the query, and where freezing time does not work.

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

User Story(ies)

As a VA Notify engineer
I want to limit serial tests
So that we can keep as many tests parallel as possible

Additional Info and Resources

image.png

Engineering Checklist

  • Update the serial tests in all folders other than tests/app/dao/
  • Any that cannot be updated should be labelled # requires serial execution - <method_name> with the method that cannot be ran in parallel

Acceptance Criteria

  • All serial tests that remain, other than those in tests/app/dao, have been labelled # requires serial execution - <method_name> or have @pytset.mark.serial removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant