You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MonkeyPolicy.InjectX(/* what to inject */, Double injectionRate, bool enabled) // or similar Func variants for injectionRate and enabled
Unit tests are likely to always want to inject the fault/response (ie injectionRate: 1 and enabled: true). Propose: Add syntax overloads throughout, of the form:
MonkeyPolicy.InjectX(/* what to inject */)
which chain on to injectionRate: 1 and enabled: true.
Timing
Would be nice to have this before launch, as stubbing for unit-tests is a major use case we can advertise, as part of the launch
See also #16 . Makes sense to implement #16 before this.
The text was updated successfully, but these errors were encountered:
Wouldn't we want to test each overload with unit test and validate different scenarios for each combinations?
reisenberger
changed the title
Add shorter syntax for result stubbing, for unit-tests
Consider shorter syntax for result stubbing, for unit-tests
Jun 30, 2019
reisenberger
changed the title
Consider shorter syntax for result stubbing, for unit-tests
Consider shorter syntax for result stubbing, for use in unit-tests in other systems on how those systems handle faults
Jun 30, 2019
Clarification: this issue is not about how we write unit tests within the Simmy repo on Simmy policies, but about how Simmy could be used as a tool to provide stub fault responses, for users to test their Polly policies in other apps. Similar to #16.
This #17 is about whether we want overloads defaulting to injectionRate: 1 and enabled: true, for the use case of always injecting the fault, for a unit-test. But maybe we don't need the extra overload - maybe it just adds extra API surface which would confuse the (majority) chaos use case. Maybe it is enough to demonstrate in a blog post/wiki page how one could use the existing syntax with injectionRate: 1 and enabled: true to stub a result in a unit test.
#16 is about whether InjectResult() would be a more neutral language for overloads than InjectFault. (In unit-testing, not every result you want to stub in is a fault.)
All current overloads are of the form:
Unit tests are likely to always want to inject the fault/response (ie
injectionRate: 1
andenabled: true
). Propose: Add syntax overloads throughout, of the form:which chain on to
injectionRate: 1
andenabled: true
.Timing
Would be nice to have this before launch, as stubbing for unit-tests is a major use case we can advertise, as part of the launch
See also #16 . Makes sense to implement #16 before this.
The text was updated successfully, but these errors were encountered: