Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: de-flake TestRefreshPendingCommands #19404

Merged
merged 1 commit into from
Oct 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/storage/client_raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,14 @@ func TestRefreshPendingCommands(t *testing.T) {
for i := 0; i < 2; i++ {
draining = draining && mtc.stores[i].IsDraining()
}
// If this goroutine can't be preempted, and we don't have other threads
// available (for example since you only have four and the other three
// are in GC, or you even only have one to begin with!), it can end up
// spinning forever. In the case that prompted adding this, there are
// four cores and "gc assist" got us stuck.
//
// See #18554.
time.Sleep(time.Nanosecond)
}
mtc.advanceClock(context.Background())

Expand Down