rename StreamFrame.FinBit to Fin

This commit is contained in:
Marten Seemann 2020-07-02 16:30:32 +07:00
parent 865332015c
commit 838dd6e81a
14 changed files with 64 additions and 64 deletions

View file

@ -332,7 +332,7 @@ var _ = Describe("Receive Stream", func() {
str.handleStreamFrame(&wire.StreamFrame{
Offset: 0,
Data: []byte{0xDE, 0xAD, 0xBE, 0xEF},
FinBit: true,
Fin: true,
})
mockSender.EXPECT().onStreamCompleted(streamID)
b := make([]byte, 4)
@ -352,7 +352,7 @@ var _ = Describe("Receive Stream", func() {
frame1 := wire.StreamFrame{
Offset: 2,
Data: []byte{0xBE, 0xEF},
FinBit: true,
Fin: true,
}
frame2 := wire.StreamFrame{
Offset: 0,
@ -379,7 +379,7 @@ var _ = Describe("Receive Stream", func() {
err := str.handleStreamFrame(&wire.StreamFrame{
Offset: 0,
Data: []byte{0xde, 0xad},
FinBit: true,
Fin: true,
})
Expect(err).ToNot(HaveOccurred())
mockSender.EXPECT().onStreamCompleted(streamID)
@ -395,7 +395,7 @@ var _ = Describe("Receive Stream", func() {
mockFC.EXPECT().AddBytesRead(protocol.ByteCount(0))
err := str.handleStreamFrame(&wire.StreamFrame{
Offset: 0,
FinBit: true,
Fin: true,
})
Expect(err).ToNot(HaveOccurred())
mockSender.EXPECT().onStreamCompleted(streamID)
@ -492,7 +492,7 @@ var _ = Describe("Receive Stream", func() {
Expect(str.handleStreamFrame(&wire.StreamFrame{
StreamID: streamID,
Data: []byte("foobar"),
FinBit: true,
Fin: true,
})).To(Succeed())
mockSender.EXPECT().onStreamCompleted(streamID)
_, err := strWithTimeout.Read(make([]byte, 100))
@ -517,7 +517,7 @@ var _ = Describe("Receive Stream", func() {
mockFC.EXPECT().UpdateHighestReceived(protocol.ByteCount(1000), true)
Expect(str.handleStreamFrame(&wire.StreamFrame{
Offset: 1000,
FinBit: true,
Fin: true,
})).To(Succeed())
mockFC.EXPECT().Abandon()
mockSender.EXPECT().queueControlFrame(gomock.Any())
@ -525,7 +525,7 @@ var _ = Describe("Receive Stream", func() {
str.CancelRead(1234)
})
It("completes the stream when receiving the FinBit after the stream was canceled", func() {
It("completes the stream when receiving the Fin after the stream was canceled", func() {
mockSender.EXPECT().queueControlFrame(gomock.Any())
str.CancelRead(1234)
gomock.InOrder(
@ -535,7 +535,7 @@ var _ = Describe("Receive Stream", func() {
mockSender.EXPECT().onStreamCompleted(streamID)
Expect(str.handleStreamFrame(&wire.StreamFrame{
Offset: 1000,
FinBit: true,
Fin: true,
})).To(Succeed())
})
@ -550,11 +550,11 @@ var _ = Describe("Receive Stream", func() {
mockSender.EXPECT().onStreamCompleted(streamID)
Expect(str.handleStreamFrame(&wire.StreamFrame{
Offset: 1000,
FinBit: true,
Fin: true,
})).To(Succeed())
Expect(str.handleStreamFrame(&wire.StreamFrame{
Offset: 1000,
FinBit: true,
Fin: true,
})).To(Succeed())
})
})
@ -616,7 +616,7 @@ var _ = Describe("Receive Stream", func() {
Expect(str.handleResetStreamFrame(rst)).To(Succeed())
})
It("doesn't call onStreamCompleted again when the final offset was already received via FinBit", func() {
It("doesn't call onStreamCompleted again when the final offset was already received via Fin", func() {
mockSender.EXPECT().queueControlFrame(gomock.Any())
str.CancelRead(1234)
mockSender.EXPECT().onStreamCompleted(streamID)
@ -625,7 +625,7 @@ var _ = Describe("Receive Stream", func() {
Expect(str.handleStreamFrame(&wire.StreamFrame{
StreamID: streamID,
Offset: rst.FinalSize,
FinBit: true,
Fin: true,
})).To(Succeed())
Expect(str.handleResetStreamFrame(rst)).To(Succeed())
})