-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(NODE-4348): enhance skip reason filtering in unified runner #3303
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5701e8a
chore: enhance skip reason filtering in unified runner
baileympearson 60b1b2f
chore: enhance skip function to return the skip reason
baileympearson d098a78
chore: resolve merge conlicts
baileympearson dc584d1
chore: re-skip failing load balancer test
baileympearson 2f5440d
chore: apply Neal's suggestions
baileympearson ca2e9f4
Update test/integration/load-balancers/load_balancers.spec.test.js
baileympearson cdcf2ee
chore: address comments on PR
baileympearson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 35 additions & 21 deletions
56
test/integration/unified-test-format/unified_test_format.spec.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,46 @@ | ||
import { loadSpecTests } from '../../spec/index'; | ||
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner'; | ||
import { TestFilter } from '../../tools/unified-spec-runner/schema'; | ||
|
||
// TODO: NODE-3891 - fix tests broken when AUTH enabled | ||
const FAILING_TESTS_AUTH_ENABLED = [ | ||
'FindOneAndUpdate is committed on first attempt', | ||
'FindOneAndUpdate is not committed on first attempt', | ||
'FindOneAndUpdate is never committed', | ||
'eventType defaults to command if unset', | ||
'events are captured during an operation', | ||
'eventType can be set to command and cmap' | ||
]; | ||
const filter: TestFilter = ({ description }) => { | ||
if (description === 'unpin after transient error within a transaction and commit') { | ||
// OLD COMMENT: commitTransaction retry seems to be swallowed by mongos in this case | ||
// TODO(NODE-3943): | ||
return `TODO(NODE-3943): commitTransaction retry seems to be swallowed by mongos in this case`; | ||
} | ||
|
||
const SKIPPED_TESTS = [ | ||
// TODO(NODE-3943): | ||
// OLD COMMENT: commitTransaction retry seems to be swallowed by mongos in this case | ||
'unpin after transient error within a transaction and commit', | ||
if (description === 'Client side error in command starting transaction') { | ||
// TODO(NODE-2034): Will be implemented as part of NODE-2034 | ||
return 'TODO(NODE-2034): Specify effect of client-side errors on in-progress transactions'; | ||
} | ||
|
||
// TODO(NODE-2034): Will be implemented as part of NODE-2034 | ||
'Client side error in command starting transaction', | ||
if (description === 'Dirty explicit session is discarded') { | ||
// TODO(NODE-3951): investigate why this is failing while the legacy version is passing | ||
return 'TODO(NODE-3951): investigate why this is failing while the legacy version is passing'; | ||
} | ||
|
||
// TODO(NODE-3308): | ||
'A successful find event with a getmore and the server kills the cursor', | ||
if (description === 'A successful find event with a getmore and the server kills the cursor') { | ||
return 'TODO(NODE-3308): failures due unnecessary getMore and killCursors calls in 5.0'; | ||
} | ||
|
||
// TODO(NODE-4125): Fix change streams resume logic when used in iterator mode | ||
'Test consecutive resume' | ||
].concat(process.env.AUTH === 'auth' ? FAILING_TESTS_AUTH_ENABLED : []); | ||
if ( | ||
process.env.AUTH === 'auth' && | ||
[ | ||
'FindOneAndUpdate is committed on first attempt', | ||
'FindOneAndUpdate is not committed on first attempt', | ||
'FindOneAndUpdate is never committed', | ||
'eventType defaults to command if unset', | ||
'events are captured during an operation', | ||
'eventType can be set to command and cmap' | ||
].includes(description) | ||
) { | ||
return 'TODO(NODE-3891): fix tests broken when AUTH enabled'; | ||
} | ||
|
||
return null; | ||
}; | ||
|
||
describe('Unified test format runner', function unifiedTestRunner() { | ||
// Valid tests that should pass | ||
runUnifiedSuite(loadSpecTests('unified-test-format/valid-pass'), SKIPPED_TESTS); | ||
runUnifiedSuite(loadSpecTests('unified-test-format/valid-pass'), filter); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.