-
Notifications
You must be signed in to change notification settings - Fork 676
GH-3891 - Configure quarantineMode #6073
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
GH-3891 - Configure quarantineMode #6073
Conversation
❌ Tests for the commit 23bdc07 have failed. See details: |
❌ Tests for the commit 8ca6db8 have failed. See details: |
❌ Tests for the commit 96a77b9 have failed. See details: |
Hi @rob4629
In general, this approach is good.
This approach doesn't seem to require a lot of changes. You need to calculate the |
Thanks for the feedback @miherlosev. I can implement that change today. Does Also, it looks like my change has broken existing functionality: testcafe -q tests/myFixture/myTest.js
ERROR The "--quarantine-mode" option value is not a valid key-value pair. If I explicitly add the testpath argument afterwards, it behaves as expected testcafe -q -t myFixture Although I'm validating it's a valid Key-Value pair in |
Ok, I don't think I understand your suggestion... here's how it sounds to me (pseudocode) const failedThreshold = passCount < retryCount ? retryCount - passCount : DEFAULT_QUARANTINE_THRESHOLD;
const failedThresholdReached = failedTimes >= failedThreshold;
.... testcafe -q // no change
testcafe -q passCount=1 // failedThreshold = 2
testcafe -q retryCount=5 // failedThreshold = 2
testcafe -q retryCount=10 // failedThreshold = 7
testcafe -q retryCount=10,passCount=1 // failedThreshold = 9 Is that your expectation? |
In general, you understand the explanation correctly. Pseudocode validateArguments({ retryCount, passCount });
const failedThreshold = retryCount - passCount;
const failedThresholdReached = failedTimes >= failedThreshold;
// All correct
testcafe -q // no change
testcafe -q passCount=1 // failedThreshold = 2
testcafe -q retryCount=5 // failedThreshold = 2
testcafe -q retryCount=10 // failedThreshold = 7
testcafe -q retryCount=10,passCount=1 // failedThreshold = 9
// Raise an error about incorrect parameters
testcafe -q retryCount=3,passCount=4 |
Ok, I've added further validation to the I've also implemented the failedThreshold as per your request, however I believe we should have a minimum failedThreshold of 3, rather than setting failedThreshold to 1 for Ultimately the decision is yours, but I look forward to hearing your thoughts. |
❌ Tests for the commit fb95e3a have failed. See details: |
❌ Tests for the commit fb95e3a have failed. See details: |
Do you need me to do more for this PR? It seems like my local master branch has become corrupted... So I'm trying to resolve that before I can investigate these failing tests |
@rob4629 Great PR. We've moved our documentation to a separate repository and it's not available for open-source contributions anymore. Please rebase your PR and remove all documentation changes (changes to I'll make sure that the documentation for this new feature makes it to our website. Thanks. |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
❌ Tests for the commit 1bf213d have failed. See details: |
✅ Tests for the commit 1bf213d have passed. See details: |
Purpose
Describe the problem you want to address or the feature you want to implement.
Closes #3891 : Allow for Quarantine threshold values to be configured (instead of hardcoded to 3). This should include the number of retries, as well as the minimum number of passes.
Approach
Describe how your changes address the issue or implement the desired functionality in as much detail as possible.
I amended
quarantineMode
to optionally accept a Dictionary. Parse the input (and validate), then use this to set the threshold values offailedThresholdReached
andpassedThresholdReached
References
Provide a link to the existing issue(s), if any.
#3891
Pre-Merge TODO