goose
goose copied to clipboard
Test requests per second part of `record_request_metric()`
In order to reliably test this hunk we need to control the return value of Utc::now()
. There is a pull request that allows that, but it is still in progress.
Until that is in we could add something on GooseAttack
that would wrap Utc::now()
and let us override it in tests. Not ideal since we would be polluting code with test-only logic.
This is a follow-up of #392.
EDIT: Also test GooseMetric::record_users_tasks_per_second()
, which has the same problem. See #394 for more info.