nicholasjackson / fake-service

Simple service for testing upstream service communications
Mozilla Public License 2.0
388 stars 76 forks source link

Fix error_rate greater 0.5 #118

Open jbierboms opened 1 year ago

jbierboms commented 1 year ago

The current way of calculation if an error should be triggered is flawed: 'int(1/e.errorPercentage)' will result in 1 if 1 >= e.errorPercentage > 0.5