Details
-
Improvement
-
Resolution: Fixed
-
Major
-
2.1.4, 2.2.0
-
None
Description
This class has duplicate code in multiple and can/should be refactored so that common paths are not duplicated. Simon said:
"yeah I was under the impression methods like renameNodesAsync, InitializeClusterAsync, etc... share a lot of common 'establishing the http client' code that could be in its own method, passing in the actual payload or a lambda containing the actual differing work"
- There are various other design problems and it lacks symmetry with respect to async/sync methods as well.
- The unit tests have a dependency on an actual cluster being provisioned; it would be nice if we could mock/fake these dependencies (if possible)
- Improved documentation in places where it's missing
- If appropriate utility methods can be possibly refactored into utils and extension classes.
What can't change:
- No breaking changes with existing IClusterManager - i.e. parameter changes, naming etc. (private methods and new methods are acceptable).
- Behavior should not change (unless it is incorrect, then it should be fixed).
**See ViewClient and QueryClient; are their opportunities for reuse/refactoring?