gomega v1.15.0 Release Notes
-
๐ Fixes
๐ The previous version (1.14.0) introduced a change to allow
Eventually
andConsistently
to support functions that make assertions. This was accomplished by overriding the global fail handler when running the callbacks passed toEventually/Consistently
in order to capture any resulting errors. Issue #457 uncovered a flaw with this approach: when multipleEventually
s are running concurrently they race when overriding the singleton global fail handler.1.15.0 resolves this by requiring users who want to make assertions in
Eventually/Consistently
call backs to explicitly pass in a function that takes aGomega
as an argument. The passed-inGomega
instance can be used to make assertions. Any failures will causeEventually
to retry the callback. This cleaner interface avoids the issue of swapping out globals but comes at the cost of changing the contract introduced in v1.14.0. As such 1.15.0 introduces a breaking change with respect to 1.14.0 - however we expect that adoption of this feature in 1.14.0 remains limited.๐จ In addition, 1.15.0 cleans up some of Gomega's internals. Most users shouldn't notice any differences stemming from the refactoring that was made.