Skip to content

FR: add Mockito.timeout(java.time.Duration) and after(java.time.Duration) #1815

@kluever

Description

@kluever

Representing durations as long's is very error prone. We've seen (and fixed) hundreds of unit mismatch bugs inside of Google.

We (Guava) have recently updated most of our public APIs to add java.time.Duration-based overloads. Caffeine and Selenium have done so as well.

Basically, I'd like to see the following APIs added:
Mockito.after(java.time.Duration)
Mockito.timeout(java.time.Duration)

And ideally the long-accepting APIs would be deprecated.

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