PalisadoesFoundation / talawa-api

API Backend for the Talawa Mobile App. Click on the link below to see our documentation
https://docs.talawa.io/
GNU General Public License v3.0
217 stars 778 forks source link

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

Open syedali237 opened 2 months ago

syedali237 commented 2 months ago

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 https://github.com/PalisadoesFoundation/talawa/issues/359

github-actions[bot] commented 2 months ago

Congratulations on making your first Issue! :confetti_ball: 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 commented 2 months ago

@syedali237 Are you willing to work on this?

varshith257 commented 2 months ago

Maybe this guide will helps for this task

syedali237 commented 2 months ago

@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 commented 1 month ago

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 commented 1 month ago

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

palisadoes commented 1 month ago

@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 commented 1 month ago

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

Cioppolo14 commented 1 month ago

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

prayanshchh commented 1 month ago

alright i will ask on slack then, thanks!

varshith257 commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

I would like work on this issue

Cioppolo14 commented 1 month ago

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

prayanshchh commented 1 month ago

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 commented 1 month ago

I am unassigning myself as nobody is responding

github-actions[bot] commented 1 month ago

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.