Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Tags: coder/quartz

Tags

v0.3.0

Toggle v0.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: support Go 1.23+ timer & ticker channel behavior (#23)

fixes #22

Changes mock ticker and timer implementations based on channels to match Go 1.23+. c.f. https://go.dev/wiki/Go123Timer

1. Channels for tickers and timers are now unbuffered.
2. Channels reads will block after `Stop()` returns.
3. We use goroutines to write to the unbuffered channels. In order to avoid leaking go routines, when the test ends, any uncompleted channel writes are abandoned. This means that reads from the channels will block after the test exits. This is usually what you want, but is a small difference in behavior from before, where we wrote to a _buffered_ channel, and so reads could complete after the test completed.

v0.2.1

Toggle v0.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: stop logging after test cleanup (#19)

Fixes Quartz so we don't accidentally log after the test ends, which [can cause racy test failures](https://app.graphite.dev/github/pr/coder/coder/18007/chore-updated-to-coder%2Fquartz-v0.2.0#discussion-IC_kwDOGkVX1s6tQd_u)

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
!feat: Call.Release takes context; add MustRelease (#17)

**BREAKING CHANGE**

Adds a `context.Context` to `(*Call.).Release()` and a new `MustRelease()`, since releasing a call can be blocking.  Use like

```
err := call.Release(ctx)
if err != nil {
  t.Error(err.Error())
}
```

or more succinctly

```
call.MustRelease(ctx)
```

This, combined with a per-test timeout context, should make it much easier to debug issues if you have a call that gets trapped by more than one trap.

v0.1.3

Toggle v0.1.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix a bug where AdvanceNext unlocks twice (#10)

Co-authored-by: edwingeng <[email protected]>

v0.1.2

Toggle v0.1.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: fix swallowing ticks on TickerFunc (#8)

Turns out #7 is bugged.  When we refused to call the TickerFunc callback, we didn't advance the next event time, so the Mock kept re-scheduling `fire()` and we could never finish processing on the tick time.

v0.1.1

Toggle v0.1.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: fix mock TickerFunc to act like real (#7)

fixes #5
fixes #6

Fixes the mock TickerFunc to behave like the real one in that it won't run more than one callback at a time and will wait until the callback completes to return from a `Wait()` call.

v0.1.0

Toggle v0.1.0's commit message
chore: add CCO license

Signed-off-by: Spike Curtis <[email protected]>