Skip to content

[Bug]: TestT_Parallel does not detect missing delays #1436

Open

Description

@dajiaohuang

What happened and what did you expect to happen?

mocktesting.TestT_Parallel leaves mt.ParallelDelay at its zero value. Its assertion compares after against before + delay in the opposite direction, so an implementation that returns immediately still passes. The test therefore does not check the configured minimum delay it says it covers.

Expected: configure ParallelDelay to the test delay and assert the measured elapsed duration is at least that delay.

Describe how to reproduce the bug

Run go test ./mocktesting -run '^TestT_Parallel$'. In the captured main source, the current test passes even when (*T).Parallel is temporarily made a no-op, demonstrating that the assertion does not catch a missing delay.

version

main at 34a13b0e5f1117f63a3d90a961abfeeede2e98af.

Relevant logs or stack trace

Not applicable; this is a test assertion gap, not a runtime failure.

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions