Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BugFix: Random test failure when tracking compilation time (#1713)
test: "tracks proper time of compiling the factory" source: acceptance/activesupport_instrumentation_spec.rb:99 The test sporadically fails with a complitation time of 0: The issue, is that the "factory_bot.compile_factory" intrumentation is actually triggered twice, not just once. First for :user and secondly for :configuration. The :configuration compilation time, which can indeed be 0, is the last one triggered, so that's the elapsed time recorded by :time_to_execute. By changing :time_to_execute to a hash, and recording the individual compilations, we can check just the :user compilation time with `time_to_execute[:user]`.
- Loading branch information