mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
split the Session.Close(error) in Close() and CloseWithError(error)
This commit is contained in:
parent
2bc5b7f532
commit
8b2992a243
22 changed files with 168 additions and 105 deletions
|
@ -220,7 +220,7 @@ var _ = Describe("Server", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
Consistently(done).ShouldNot(BeClosed())
|
||||
// make the go routine return
|
||||
sessionHandler.EXPECT().Close(nil)
|
||||
sessionHandler.EXPECT().Close()
|
||||
close(serv.errorChan)
|
||||
serv.Close()
|
||||
Eventually(done).Should(BeClosed())
|
||||
|
@ -242,7 +242,7 @@ var _ = Describe("Server", func() {
|
|||
serv.serve()
|
||||
}()
|
||||
// close the server
|
||||
sessionHandler.EXPECT().Close(nil).AnyTimes()
|
||||
sessionHandler.EXPECT().Close().AnyTimes()
|
||||
Expect(serv.Close()).To(Succeed())
|
||||
Expect(conn.closed).To(BeTrue())
|
||||
})
|
||||
|
@ -279,7 +279,7 @@ var _ = Describe("Server", func() {
|
|||
It("errors when encountering a connection error", func() {
|
||||
testErr := errors.New("connection error")
|
||||
conn.readErr = testErr
|
||||
sessionHandler.EXPECT().Close(nil)
|
||||
sessionHandler.EXPECT().Close()
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
defer GinkgoRecover()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue