(t *testing.T)
| 332 | synctest.Test(t, testConnOutflowMaxDataDecreases) |
| 333 | } |
| 334 | func 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 | |
| 361 | func TestConnOutflowMaxDataRoundRobin(t *testing.T) { |
| 362 | synctest.Test(t, testConnOutflowMaxDataRoundRobin) |
nothing calls this directly
no test coverage detected
searching dependent graphs…