goose icon indicating copy to clipboard operation
goose copied to clipboard

Test requests per second part of `record_request_metric()`

Open slashrsm opened this issue 3 years ago • 0 comments

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.

slashrsm avatar Nov 22 '21 17:11 slashrsm