fix(cmpp): preserve inbound window after message registration
This commit is contained in:
@@ -346,6 +346,21 @@ func TestBoundedSubmitWindowAndAggregateSlotSnapshot(t *testing.T) {
|
||||
if configured != 48 || inFlight != 4 {
|
||||
t.Fatalf("slot snapshot configured=%d in_flight=%d, want 48/4", configured, inFlight)
|
||||
}
|
||||
|
||||
conn := &cmpp.Conn{}
|
||||
counter := &atomic.Int64{}
|
||||
counter.Store(2)
|
||||
rememberDownstream(downstreamSession{
|
||||
messageID: "MSG-WINDOW-SNAPSHOT", account: "100030", conn: conn,
|
||||
windowSize: 32, submitInFlight: counter,
|
||||
})
|
||||
if got := submitWindowByConn(conn); got != 32 {
|
||||
t.Fatalf("message registration replaced connection window with %d, want 32", got)
|
||||
}
|
||||
configured, inFlight = SubmitSlotSnapshot()
|
||||
if configured != 80 || inFlight != 6 {
|
||||
t.Fatalf("post-message slot snapshot configured=%d in_flight=%d, want 80/6", configured, inFlight)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDecodeInboundLongMessageStripsConcatUDHBeforeUCS2Decode(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user