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

Group Tests Based on Thread Affinity - Follow-up to Issue #2236 #2491

Open
syedali237 opened this issue Aug 30, 2024 · 19 comments
Open

Group Tests Based on Thread Affinity - Follow-up to Issue #2236 #2491

syedali237 opened this issue Aug 30, 2024 · 19 comments
Labels
feature request test Testing application

Comments

@syedali237
Copy link

Is your feature request related to a problem? Please describe.
Summary:
We have recently modified our test configuration to run tests using threads and disabled file parallelism to reduce the overall test runtime. However, parallelism may lead to race conditions, making certain tests flaky or unreliable.

To ensure the stability of our test suite, we need to:

Review and identify tests that may be prone to race conditions.
Adjust the configuration to run such tests sequentially where necessary.
Document any identified issues and the steps taken to mitigate them.
This issue will track the investigation and any necessary changes to ensure our tests run reliably without unintended interference from parallel execution.

Describe the solution you'd like
As a follow-up to issue #2236, we need to group different tests together based on their thread affinity. The goal is to ensure that certain tests run on the same threads to avoid race conditions and improve the reliability of our test suite. This approach will help maintain stability when tests are run in parallel by reducing potential interference between tests that share resources.

Describe alternatives you've considered
Before parallelization, the test run time was 20 minutes. However, after PR #2490, it has been reduced to 4 minutes.

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship PalisadoesFoundation/talawa#359

@github-actions github-actions bot added test Testing application unapproved Unapproved for Pull Request labels Aug 30, 2024
Copy link

Congratulations on making your first Issue! 🎊 If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues.

@palisadoes
Copy link
Contributor

@syedali237 Are you willing to work on this?

@varshith257
Copy link
Member

Maybe this guide will helps for this task

@syedali237
Copy link
Author

@palisadoes I'd love to help, but I'm currently tied up with two other assigned issues. Please feel free to reassign this one. Happy to assist in the future if needed!

@ARYANSHAH1567
Copy link

I would like to work on this issue but am unsure of the exact steps to take. If someone could guide me, I would be happy to take on the responsibility of addressing this issue.

@Cioppolo14
Copy link
Contributor

@ARYANSHAH1567 I will assign you the issue. Reaching out to our slack community is a great place to start getting guidance.

@palisadoes
Copy link
Contributor

@ARYANSHAH1567

Our policy is to assign no more than two issues to each contributor across all repositories. This way everyone gets a chance to participate in the projects. We sometimes give exceptions for more urgent cases and sometimes we lose track, but the policy stands. You have reached your limit, please wait until your existing issues are closed before requesting more issues. You could unassign yourself from one of the other issues too.

unassigning

@prayanshchh
Copy link

I can work on this issue, but I will need guidance

@Cioppolo14
Copy link
Contributor

@prayanshchh I will assign you, please utilize our slack community for guidance.

@prayanshchh
Copy link

alright i will ask on slack then, thanks!

@varshith257
Copy link
Member

@prayanshchh You can identify dependency tests in test suites by checking the dependency on other tests something which have to be run first and then next test something like Test A depends on Test B

@prayanshchh
Copy link

so based on this, if Test A runs before Test B and passes then Test B potentially might depend on A, but this might also overestimate dependencies, if this is okay then I can track dependencies based on no.of tests before a particular test.

@prayanshchh
Copy link

or while checking all the tests that come before a test, can we also compare the state of two tests, if there is a overlap then test A depends on test B.

@akshayw1
Copy link

akshayw1 commented Sep 9, 2024

I would like work on this issue

@Cioppolo14
Copy link
Contributor

@akshayw1 I meant to assign @prayanshchh but somehow missed ensuring the assignment was made. Sorry about that.

@prayanshchh
Copy link

or while checking all the tests that come before a test, can we also compare the state of two tests, if there is a overlap then test A depends on test B.

can someone help me out with the query as I am not able to move forward with the issue, I have also asked the same on slack.

@prayanshchh
Copy link

I am unassigning myself as nobody is responding

@prayanshchh prayanshchh removed their assignment Sep 15, 2024
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Sep 26, 2024
@nilaygit-10721
Copy link

please assign me this issue?

@github-actions github-actions bot removed the no-issue-activity No issue activity label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request test Testing application
Projects
Status: Backlog
Development

No branches or pull requests

8 participants