Skip to content

Commit

Permalink
build(deps): Bump github.com/jonboulle/clockwork from 0.4.0 to 0.5.0 (#…
Browse files Browse the repository at this point in the history
…3448)

Bumps [github.com/jonboulle/clockwork](https://github.com/jonboulle/clockwork) from 0.4.0 to 0.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/jonboulle/clockwork/releases">github.com/jonboulle/clockwork's releases</a>.</em></p>
<blockquote>
<h2>v0.5.0</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Enhancements 🚀</h3>
<ul>
<li>Convert FakeClock to a struct. by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/71">jonboulle/clockwork#71</a></li>
</ul>
<h3>Dependency Updates ⬆️</h3>
<ul>
<li>build(deps): bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/73">jonboulle/clockwork#73</a></li>
<li>build(deps): bump actions/setup-go from 4 to 5 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/80">jonboulle/clockwork#80</a></li>
<li>build(deps): bump github/codeql-action from 2 to 3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/81">jonboulle/clockwork#81</a></li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>Make NewTicker panic if d&lt;=0, like time.NewTicker. by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/70">jonboulle/clockwork#70</a></li>
<li>Fix typos and grammar issue by <a href="https://github.com/alexandear"><code>@​alexandear</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/72">jonboulle/clockwork#72</a></li>
<li>Set minimal workflow permissions by <a href="https://github.com/pnacht"><code>@​pnacht</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/75">jonboulle/clockwork#75</a></li>
<li>Add security policy by <a href="https://github.com/pnacht"><code>@​pnacht</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/78">jonboulle/clockwork#78</a></li>
<li>add Until method on clock interface by <a href="https://github.com/WillMatthews"><code>@​WillMatthews</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/85">jonboulle/clockwork#85</a></li>
<li>Bump Go version to 1.21. by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/89">jonboulle/clockwork#89</a></li>
<li>Remove some duplication &amp; use slices package. by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/90">jonboulle/clockwork#90</a></li>
<li>Standardize tests for core clockwork functions. by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/91">jonboulle/clockwork#91</a></li>
<li>Add contexts that use FakeClock rather than the system time. by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/92">jonboulle/clockwork#92</a></li>
<li>Remove firer struct &amp; fix ticker reset by <a href="https://github.com/DPJacques"><code>@​DPJacques</code></a> in <a href="https://redirect.github.com/jonboulle/clockwork/pull/95">jonboulle/clockwork#95</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/alexandear"><code>@​alexandear</code></a> made their first contribution in <a href="https://redirect.github.com/jonboulle/clockwork/pull/72">jonboulle/clockwork#72</a></li>
<li><a href="https://github.com/pnacht"><code>@​pnacht</code></a> made their first contribution in <a href="https://redirect.github.com/jonboulle/clockwork/pull/75">jonboulle/clockwork#75</a></li>
<li><a href="https://github.com/WillMatthews"><code>@​WillMatthews</code></a> made their first contribution in <a href="https://redirect.github.com/jonboulle/clockwork/pull/85">jonboulle/clockwork#85</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0">https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/jonboulle/clockwork/commit/6d8d032a18422c2e3ef651170a8a55012d1f704c"><code>6d8d032</code></a> Remove firer struct &amp; fix ticker reset (<a href="https://redirect.github.com/jonboulle/clockwork/issues/95">#95</a>)</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/91d2c0adaca249481d9c61dd194383fa62d30826"><code>91d2c0a</code></a> Add contexts that use FakeClock rather than the system time. (<a href="https://redirect.github.com/jonboulle/clockwork/issues/92">#92</a>)</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/7e524bd2b23863a60332249b53a095fc9370603a"><code>7e524bd</code></a> Standardize tests for core clockwork functions. (<a href="https://redirect.github.com/jonboulle/clockwork/issues/91">#91</a>)</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/11a247d8fc82069355fd024bc08d4ad4366c0013"><code>11a247d</code></a> Remove some duplication &amp; use slices package. (<a href="https://redirect.github.com/jonboulle/clockwork/issues/90">#90</a>)</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/fe91b0de93b9f79240e9f4ed093120db61f49ee7"><code>fe91b0d</code></a> Bump Go verison to 1.21.</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/33fc064cceda86a937e85a0b01309974970c6a52"><code>33fc064</code></a> add Until method on clocks</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/fc59783b0293939df2ade8872f0e8cfd87c9dbfe"><code>fc59783</code></a> build(deps): bump github/codeql-action from 2 to 3</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/5c13cb81e3298b37d5623bda1034c01e324de26e"><code>5c13cb8</code></a> Merge pull request <a href="https://redirect.github.com/jonboulle/clockwork/issues/80">#80</a> from jonboulle/dependabot/github_actions/actions/setup...</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/72da535d7ba42700d02c4976b2dc4fd95e716b1d"><code>72da535</code></a> Update documentaiton on interactions with context.</li>
<li><a href="https://github.com/jonboulle/clockwork/commit/5508bca6cc96e1dcbb467049b40ec773b64c5d77"><code>5508bca</code></a> build(deps): bump actions/setup-go from 4 to 5</li>
<li>Additional commits viewable in <a href="https://github.com/jonboulle/clockwork/compare/v0.4.0...v0.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/jonboulle/clockwork&package-manager=go_modules&previous-version=0.4.0&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
  • Loading branch information
dependabot[bot] authored Jan 22, 2025
1 parent 06233ce commit e8f02f6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
17 changes: 10 additions & 7 deletions app/monitoringapi_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ func TestStartChecker(t *testing.T) {
}

// Advance clock for first tick.
advanceClock(clock, 10*time.Second)
advanceClock(t, ctx, clock, 10*time.Second)

// Advance clock for first epoch tick.
advanceClock(clock, 32*12*time.Second)
advanceClock(t, ctx, clock, 32*12*time.Second)

waitFor := 1 * time.Second
tickInterval := 1 * time.Millisecond
if tt.err != nil {
require.Eventually(t, func() bool {
advanceClock(clock, 10*time.Second)
advanceClock(t, ctx, clock, 10*time.Second)
err = readyErrFunc()
if !errors.Is(err, tt.err) {
t.Logf("Ignoring unexpected error, got=%v, want=%v", err, tt.err)
Expand All @@ -176,20 +176,23 @@ func TestStartChecker(t *testing.T) {
}, waitFor, tickInterval)
} else {
require.Eventually(t, func() bool {
advanceClock(clock, 12*time.Second)
advanceClock(t, ctx, clock, 12*time.Second)
return readyErrFunc() == nil
}, waitFor, tickInterval)
}
})
}
}

func advanceClock(clock clockwork.FakeClock, duration time.Duration) {
func advanceClock(t *testing.T, ctx context.Context, clock *clockwork.FakeClock, duration time.Duration) {
t.Helper()
numTickers := 2

// We wrap the Advance() calls with blockers to make sure that the ticker
// can go to sleep and produce ticks without time passing in parallel.
clock.BlockUntil(numTickers)
err := clock.BlockUntilContext(ctx, numTickers)
require.NoError(t, err)
clock.Advance(duration)
clock.BlockUntil(numTickers)
err = clock.BlockUntilContext(ctx, numTickers)
require.NoError(t, err)
}
4 changes: 4 additions & 0 deletions core/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,7 @@ func (c *testClock) NewTimer(time.Duration) clockwork.Timer {
func (c *testClock) AfterFunc(time.Duration, func()) clockwork.Timer {
panic("not supported")
}

func (c *testClock) Until(t time.Time) time.Duration {
panic("not supported")
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/herumi/bls-eth-go-binary v1.36.1
github.com/holiman/uint256 v1.3.2
github.com/ipfs/go-log/v2 v2.5.1
github.com/jonboulle/clockwork v0.4.0
github.com/jonboulle/clockwork v0.5.0
github.com/jsternberg/zap-logfmt v1.3.0
github.com/libp2p/go-libp2p v0.37.2
github.com/libp2p/go-msgio v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569z
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jhump/protoreflect/v2 v2.0.0-beta.2 h1:qZU+rEZUOYTz1Bnhi3xbwn+VxdXkLVeEpAeZzVXLY88=
github.com/jhump/protoreflect/v2 v2.0.0-beta.2/go.mod h1:4tnOYkB/mq7QTyS3YKtVtNrJv4Psqout8HA1U+hZtgM=
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=
github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
Expand Down

0 comments on commit e8f02f6

Please sign in to comment.