Commit 1c3fa5e9 authored by yacovm's avatar yacovm Committed by Yacov Manevich
Browse files

[FAB-12882] Fix UT flake TestBlockPullerClone

In tests where we have 2 block pullers, or that the block
puller initiates a disconnect, the server side deliver service
may send 2 blocks down the stream before it senses the disconnect.
This interferes with the assertions of the next block pull after the

This change set fixes this by making the server side expect
a disconnect after the last block of that client is expected
to be pulled.

Change-Id: Ic5501098ced12684f95d4a4f698f06963d6f7908
Signed-off-by: default avataryacovm <>
parent f4b1a7e0
......@@ -412,9 +412,14 @@ func TestBlockPullerClone(t *testing.T) {
// last block sequence is 100
// The block puller is expected to disconnect after pulling
// a single block. So signal the server-side to avoid
// grabbing the next block after block 1 is pulled.
osn1.blockResponses <- nil
dialer := newCountingDialer()
bp := newBlockPuller(dialer, osn1.srv.Address())
bp.FetchTimeout = time.Millisecond * 100
// Pull a block at a time and don't buffer them
bp.MaxTotalBufferBytes = 1
// Clone the block puller
......@@ -431,8 +436,6 @@ func TestBlockPullerClone(t *testing.T) {
// clone should not be affected
// Sending a block after the block puller is closed results in the server side routine to finish
// The clone block puller should not have cached the internal state
// from its origin block puller, thus it should probe again for the last block
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment