Published by blgm about 3 years ago
Published by onsi about 3 years ago
The previous version (1.14.0) introduced a change to allow Eventually
and Consistently
to support functions that make assertions. This was accomplished by overriding the global fail handler when running the callbacks passed to Eventually/Consistently
in order to capture any resulting errors. Issue #457 uncovered a flaw with this approach: when multiple Eventually
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 a Gomega
as an argument. The passed-in Gomega
instance can be used to make assertions. Any failures will cause Eventually
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.
Published by onsi over 3 years ago
Published by onsi over 3 years ago
Set consistently and eventually defaults on init (#443)
Using environment variables
Closes #434
Signed-off-by: toby lorne [email protected]
gmeasure provides BETA support for benchmarking (#447)
gmeasure is a new gomega subpackage intended to provide measurement and benchmarking support for durations and values. gmeasure replaces Ginkgo V1s deprecated Measure nodes and provides a migration path for users migrating to Ginkgo V2.
gmeasure is organized around an Experiment metaphor. Experiments can record several different Measurements, with each Measurement comprised of multiple data points. Measurements can hold time.Durations and float64 values and gmeasure includes support measuring the duraiton of callback functions and for sampling functions repeatedly to build an ensemble of data points. In addition, gmeasure introduces a Stopwatch abtraction for easily measuring and recording durations of code segments.
Once measured, users can readily generate Stats for Measurements to capture their key statistics and these stats can be ranked using a Ranking and associated RankingCriteria.
Experiments can be Cached to disk to speed up subsequent runs. Experiments are cached by name and version number which makes it easy to manage and bust the cache.
Finally, gmeasure integrates with Ginkgo V2 via the new ReportEntry abstraction. Experiments, Measurements, and Rankings can all be registered via AddReportEntry. Doing so generates colorful reports as part of Ginkgo's test output.
gmeasure is currently in beta and will go GA around when Ginkgo V2 goes GA.
Published by onsi over 3 years ago
Published by blgm over 3 years ago
Published by blgm over 3 years ago
Published by blgm almost 4 years ago
Published by blgm about 4 years ago
Published by blgm about 4 years ago
Published by blgm over 4 years ago
Published by williammartin over 4 years ago
Published by blgm over 4 years ago
Published by blgm almost 5 years ago
Published by blgm almost 5 years ago
Published by blgm almost 5 years ago
Published by williammartin over 5 years ago