go-dynamock
go-dynamock copied to clipboard
Adding a test for both out of order and race condition, fixing GetItem for OOO
Hi! Thanks for the library!
I noticed there was a problem where if the test suite calls out of order from the order that the expectations were set then we'd get different behavior.
This works off of what was added for BatchWriteItem in #16. Note that this could be considered backwards incompatible because the errors that are returned are different, if we are considering the entire list of expectations then we can't necessarily return as nice of errors.
Additionally I suspected that we would be getting a race condition where expectations aren't properly removed. This is fixed by introducing a mutex.
@gusaul are these changes something you'd like to see land in master?