benbjohnson/clock

Provide Clock.Until

rojer9-fb opened this issue · 4 comments

Would it be OK if I worked on this, @benbjohnson? Are PRs still accepted? :)

Hm, tests are currently failing:

tereshkova ~/p/clock [master] $ go test -v .
=== RUN   TestClock_After
--- PASS: TestClock_After (0.02s)
=== RUN   TestClock_AfterFunc
panic: Fail in goroutine after TestClock_After has completed

goroutine 8 [running]:
testing.(*common).Fail(0xc0001321a0)
        /home/dustin/.gvm/gos/go1.17/src/testing/testing.go:710 +0xe5
testing.(*common).FailNow(0xc0001321a0)
        /home/dustin/.gvm/gos/go1.17/src/testing/testing.go:732 +0x1e
testing.(*common).Fatal(0x1c9c380, {0xc0000577c0, 0x0, 0x0})
        /home/dustin/.gvm/gos/go1.17/src/testing/testing.go:824 +0x4f
github.com/benbjohnson/clock.TestClock_After.func2()
        /home/dustin/p/clock/clock_test.go:21 +0x5e
created by github.com/benbjohnson/clock.TestClock_After
        /home/dustin/p/clock/clock_test.go:19 +0xb2
FAIL    github.com/benbjohnson/clock    0.034s
FAIL

Ah, I think this is due to calling t.Fatal from a goroutine?

#34 for the tests