Skip to content

Tests rely on time changing #51

Description

@ThisIsMissEm

Currently I'm seeing quite a high rate of test failures on WatchOS for what appears to be a failure related due to access token expiry not being as expected. The tests that use AsyncStream<String>.makeStream() tend to rely on time changing in a predictable manner, such as @Test func tokenExpiredAfterUseRefresh, which seems to not always be the case.

I'm wondering if we could actually substitute the Token for these tests with one where we can control whether the token is expired or not?

That would decouple us from any system time weirdness whilst still testing what we want to test: given an access token that starts out valid, but then expires, what are the requests that happen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions