send a HANDSHAKE_DONE frame after handshake completion (as a server)

This commit is contained in:
Marten Seemann 2019-11-22 10:43:24 +08:00
parent 556e5c5559
commit 08ec2f69fc
2 changed files with 7 additions and 5 deletions

View file

@ -1239,10 +1239,13 @@ var _ = Describe("Session", func() {
Eventually(sess.Context().Done()).Should(BeClosed())
})
It("sends a 1-RTT packet when the handshake completes", func() {
It("sends a HANDSHAKE_DONE frame when the handshake completes", func() {
done := make(chan struct{})
sessionRunner.EXPECT().Retire(clientDestConnID)
packer.EXPECT().PackPacket().DoAndReturn(func() (*packedPacket, error) {
frames, _ := sess.framer.AppendControlFrames(nil, protocol.MaxByteCount)
Expect(frames).ToNot(BeEmpty())
Expect(frames[0].Frame).To(BeEquivalentTo(&wire.HandshakeDoneFrame{}))
defer close(done)
return &packedPacket{
header: &wire.ExtendedHeader{},