Skip to content

Flaky test failure: test_ki_wakes_us_up on Windows #624

@njsmith

Description

@njsmith

As noticed by @Fuyukai:

https://ci.appveyor.com/project/njsmith/trio/build/1.0.1302/job/nm14lkm4vpwgk6yw

I think this is the same issue we ran into here: #575 (comment)

Basically on Windows, time.sleep and time.monotonic use slightly different clocks, so it's possible to do time.sleep(1) and then have time.monotonic report that slightly less than 1 second has passed. (trio.sleep doesn't have this problem, fortunately ­– only time.sleep does.)

For this particular test, the timing isn't too important – the only reason we check is to make sure that we notice in case something weird happens and its taking like, tens of seconds.

So the easy solution is: make it time.sleep(1.1) (with a comment back to this issue!) and move on with our lives.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions