Refactor GenerateOperationAndRequest to clone Operation
In preparation for other work in the Secret Detection and Leak Prevention epic, the way Operation and Request instances are generated during testing will need to change. Instead of driving the generation using an original Request instance, the generation will be performed by cloning Operation and Request instances.
Special care should be taken when writing the Clone methods to be performant.
-
Add a benchmark for RunnerService.GenerateOperationAndRequestand take a reading prior refactoring. -
Add a Clonemethod toOperation -
Add a Clonemethod toRequest -
Add a Clonemethod toResponse -
Refactor RunnerService.GenerateOperationAndRequestto accept an originalOperationandRequestwhich are copied using the newClonemethod. -
Refactor RunnerService.GenerateCurrentOperationto use the newClonemethod. -
Re-run benchmark and compare results. Goal is to be faster or similar in speed to original code. -
Add all needed tests
Edited by Michael Eddington