Increment level only for methods/classes/packages listed in WatchedCustomServices (instead of every watched method/class/package) #452
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.
What:
The level count increases every time we encounter a watched method, class, or package, regardless of whether it's present in the WatchedCustomServices list or not. Through this PR, I have made some changes to instead increase the level count only when a watched method (or class or package) is listed in WatchedCustomServices.
More details on this can be found at #451
Why:
These changes would help improve predictability wherein only methods/classes/packages listed within the WatchedCustomServices would increase level counts, as opposed to any and every watched method doing the same.
How:
Changes have been made within the logic of
callChaosMonkey(ChaosTarget type, String simpleName)
function present in theChaosMonkeyRequestScope.java
file.A check has been implemented to verify if WatchedCustomServices is active and if the exact same method is present in WatchedCustomServices . If yes, only then the level count is incremented.
Checklist: