fix: add acceptance tests for slowlogs.Recorder

What does this MR do?

This MR adds acceptance tests for the slowlogs.Recorder component as requested in issue #1141 (closed) . The tests verify that:

  • Proper recording of timing data for slow requests
  • Correct logging of nested recorder calls with appropriate timing values
  • No logging occurs for requests faster than the threshold

The tests are designed to fail if new recorder calls are added without updating the tests, as requested in the original issue.

Related issues

Closes #1141 (closed)

Implementation details

Added two test cases in the acceptance test package:

  1. TestSlowlogsRecorderIntegration - Tests slow requests that exceed the threshold
  2. TestSlowlogsRecorderWithFastRequest - Tests fast requests that don't trigger logging

The tests simulate real-world usage patterns of the recorder in the codebase by creating nested function calls with multiple recorders, similar to how they're used in ``internal/vfs/serving/serving.go`.

MR acceptance checklist

  • Tests pass
Edited by Naman Jagdish Gala

Merge request reports

Loading
Loading