mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
parent
c62fa83248
commit
3c223b22a2
8 changed files with 93 additions and 37 deletions
|
@ -169,7 +169,8 @@ var _ = Describe("Server", func() {
|
|||
|
||||
It("closes and deletes sessions", func() {
|
||||
serv.deleteClosedSessionsAfter = time.Second // make sure that the nil value for the closed session doesn't get deleted in this test
|
||||
err := serv.handlePacket(nil, nil, append(firstPacket, (&crypto.NullAEAD{}).Seal(nil, nil, 0, firstPacket)...))
|
||||
nullAEAD := crypto.NewNullAEAD(protocol.PerspectiveServer, protocol.VersionWhatever)
|
||||
err := serv.handlePacket(nil, nil, append(firstPacket, nullAEAD.Seal(nil, nil, 0, firstPacket)...))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(serv.sessions).To(HaveLen(1))
|
||||
Expect(serv.sessions[connID]).ToNot(BeNil())
|
||||
|
@ -181,7 +182,8 @@ var _ = Describe("Server", func() {
|
|||
|
||||
It("deletes nil session entries after a wait time", func() {
|
||||
serv.deleteClosedSessionsAfter = 25 * time.Millisecond
|
||||
err := serv.handlePacket(nil, nil, append(firstPacket, (&crypto.NullAEAD{}).Seal(nil, nil, 0, firstPacket)...))
|
||||
nullAEAD := crypto.NewNullAEAD(protocol.PerspectiveServer, protocol.VersionWhatever)
|
||||
err := serv.handlePacket(nil, nil, append(firstPacket, nullAEAD.Seal(nil, nil, 0, firstPacket)...))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(serv.sessions).To(HaveLen(1))
|
||||
serv.closeCallback(connID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue