Isn't that a test case?
isDatabaseDown
should be true
.
You can always make it more real by adding methods that mimic real world systems.
At the same time, you always have these escape hatches at your disposal. You can just use flags as railway switches and change tracks.
Now, to cover both the cases, we can create two stories!
isDatabaseDown
is false
and anothere where it’s true
.
In the first story we see that the poller and webhook align perfectly to create a blind spot. Both start working on the same payment, not knowing that the other is doing the same. This leads to our system capturing the same payment twice!
std.flow
business in the script? What does it do? Why does it have that weird syntax?
Well, let’s find out in the next section!