spacewander commented on a change in pull request #2980:
URL: https://github.com/apache/apisix/pull/2980#discussion_r538213374
##########
File path: apisix/plugins/fault-injection.lua
##########
@@ -60,7 +60,7 @@ local function sample_hit(percentage)
return true
end
- return random(0, 100) <= percentage
+ return random(1, 100) <= percentage
Review comment:
Current behavior is the correct one according to the doc. Previously,
fault-injection will happen even percentage is zero.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]