Test: add version to managed pool. #2075
Closed
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 showcases a possible version implementation for managed pool, refactoring as little as possible. Code is expected to build, but tests will fail.
Adding one more parameter to managed pool causes stack too deep errors (at managed pool, or at managed pool settings depending how the version is piped through). Working around it without refactoring seems not to be ideal; there might be a better solution than this one, but it'll probably still be messy.
Note: if
ManagedPoolSettings
implementsVersion
, it also has a stack too deep error.Given that the constructors are pretty much on the edge, I'd propose to add the version in the base layer and do a bigger refactor. Part of the issue is that we are mixing parameters that are needed in different layers in the same struct. One example can be seen here:
NewPoolParams
has name and version, which are not needed byManagedPoolSettings
. This can be solved in the refactor by grouping the parameters in a more appropriate way.