Skip to content

Commit 1df0441

Browse files
committed
Renaming done as gracefulStopDone
1 parent 61374bc commit 1df0441

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/gracefulstop_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,15 @@ func (s) TestGracefulStop(t *testing.T) {
124124
stubserver.StartTestService(t, ss)
125125

126126
// 1. Start Server
127-
done := make(chan struct{})
127+
gracefulStopDone := make(chan struct{})
128+
<-dlis.acceptCalled
129+
ss.S.GracefulStop()
130+
close(gracefulStopDone)
128131
go func() {
129132
<-dlis.acceptCalled
130133
ss.S.GracefulStop()
131-
close(done)
134+
close(gracefulStopDone)
132135
}()
133-
134136
// 2. GracefulStop() Server after listener's Accept is called, but don't
135137
// allow Accept() to exit when Close() is called on it.
136138

@@ -159,7 +161,7 @@ func (s) TestGracefulStop(t *testing.T) {
159161
t.Fatalf("FullDuplexCall= _, %v; want _, <status code Unavailable>", err)
160162
}
161163
cancel()
162-
<-done
164+
<-gracefulStopDone
163165
}
164166

165167
// TestGracefulStopClosesConnAfterLastStream ensures that a server closes the

0 commit comments

Comments
 (0)