Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors ExecutionProfile handling and reorganizes unit tests so execution-profile/execution-options behavior is covered under the main unit test suite (aligning with the already-used integration coverage referenced in #271).
Changes:
- Refactor
ExecutionProfilefrom a function constructor to an ES6 class and explicitly rejectgraphOptions. - Add new unit test suites for
ProfileManagerandDefaultExecutionOptions. - Move a large set of basic/type/clientOptions/export API unit tests from
unit-not-supportedintounit.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
lib/execution-profile.js |
Refactors ExecutionProfile to a class; adds graphOptions rejection; adjusts JSDoc/type-hint imports. |
lib/client-options.js |
Updates JSDoc typing for profiles and removes the outdated TODO note. |
test/unit/execution-profile-tests.js |
New unit tests for ProfileManager defaults and lookup behavior. |
test/unit/execution-options-tests.js |
New unit tests for DefaultExecutionOptions resolution and defaults. |
test/unit/basic-tests.js |
Imports/hosts moved tests previously under unit-not-supported into the main unit suite. |
test/unit-not-supported/basic-tests.js |
Removes tests that were migrated to test/unit/basic-tests.js. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
31
to
46
| /** | ||
| * Consistency level. | ||
| * @type {Number} | ||
| * @param {String} name Name of the execution profile. | ||
| * Use `'default'` to specify that the new instance should be the default {@link ExecutionProfile} if no | ||
| * profile is specified in the execution. | ||
| * @param {Object} [options] Profile options, when any of the options is not specified the {@link Client} will the use | ||
| * the ones defined in the default profile. | ||
| * @param {Number} [options.consistency] The consistency level to use for this profile. | ||
| * @param {LoadBalancingPolicy} [options.loadBalancing] The load-balancing policy to use for this profile. | ||
| * @param {Number} [options.readTimeout] The client per-host request timeout to use for this profile. | ||
| * @param {RetryPolicy} [options.retry] The retry policy to use for this profile. | ||
| * @param {Number} [options.serialConsistency] The serial consistency level to use for this profile. | ||
| * @param {LoadBalancingPolicy} [options.loadBalancing] The load-balancing policy to use for this profile. | ||
| * @param {Number} [options.readTimeout] The client per-host request timeout to use for this profile. | ||
| * @param {RetryPolicy} [options.retry] The retry policy to use for this profile. | ||
| * @param {Number} [options.serialConsistency] The serial consistency level to use for this profile. | ||
| */ |
Same as always, automatic refactor with manual changes to the documentation
This option was already supported through JS part of the code
Some of the unit tests from not supported (working but not revived) can now be considered fully supported (were updated for the use in this driver)
d70a556 to
cc137b1
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR refactors Execution profiles, and some of the unit tests.
Fixes: #271 - This class was already supported and used across integration tests. I've ensured it's logic is used properly. Also moved unit tests related to this class from
unit-not-supportedtounit.