Skip to content

device: fix slow test and go vet#53

Open
illotum wants to merge 1 commit intotailscalefrom
illotum/fix-wait-test
Open

device: fix slow test and go vet#53
illotum wants to merge 1 commit intotailscalefrom
illotum/fix-wait-test

Conversation

@illotum
Copy link
Copy Markdown

@illotum illotum commented Apr 8, 2026

TestWaitPool now scales better to small hosts,
and no longer triggers go vet.

Change-Id: I97a2d22561468de14b17e09d557f212b6a6a6964

Copilot AI review requested due to automatic review settings April 8, 2026 17:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves TestWaitPool so it runs faster on small hosts and avoids go vet warnings, while still validating WaitPool concurrency behavior.

Changes:

  • Scale startTrials based on runtime.NumCPU() (and reduce further under -race) to speed up the test on smaller machines.
  • Fix t.Errorf formatting by printing max.Load() instead of the atomic value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

TestWaitPool now scales better to small hosts,
and no longer triggers `go vet`.

Signed-off-by: Alex Valiushko <alexvaliushko@tailscale.com>
Change-Id: I97a2d22561468de14b17e09d557f212b6a6a6964
@illotum illotum force-pushed the illotum/fix-wait-test branch from 0b2d447 to f64bded Compare April 8, 2026 18:01
@illotum illotum requested a review from jwhited April 8, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants