MCPcopy
hub / github.com/golang/net / testConnOutflowMaxDataDecreases

Function testConnOutflowMaxDataDecreases

quic/conn_flow_test.go:334–359  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

332 synctest.Test(t, testConnOutflowMaxDataDecreases)
333}
334func testConnOutflowMaxDataDecreases(t *testing.T) {
335 tc, s := newTestConnAndLocalStream(t, clientSide, uniStream,
336 permissiveTransportParameters,
337 func(p *transportParameters) {
338 p.initialMaxData = 10
339 })
340 tc.ignoreFrame(frameTypeAck)
341
342 // Decrease in MAX_DATA is ignored.
343 tc.writeFrames(packetType1RTT, debugFrameMaxData{
344 max: 5,
345 })
346
347 data := makeTestData(32)
348 n, err := s.Write(data)
349 if n != len(data) || err != nil {
350 t.Fatalf("s.Write() = %v, %v; want %v, nil", n, err, len(data))
351 }
352 s.Flush()
353
354 tc.wantFrame("stream writes data up to MAX_DATA limit",
355 packetType1RTT, debugFrameStream{
356 id: s.id,
357 data: data[:10],
358 })
359}
360
361func TestConnOutflowMaxDataRoundRobin(t *testing.T) {
362 synctest.Test(t, testConnOutflowMaxDataRoundRobin)

Callers

nothing calls this directly

Calls 7

makeTestDataFunction · 0.85
ignoreFrameMethod · 0.80
writeFramesMethod · 0.80
wantFrameMethod · 0.80
WriteMethod · 0.65
FlushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…