Skip to content

Commit

Permalink
[FAB-3175] Fix Intermittent CI failure deliveryService
Browse files Browse the repository at this point in the history
This commit attempts to fix an intermittent CI failure
that was introduced lately.

Change-Id: I364fcabf9afcfa12244bb9ebf0df3e1d8d4f0745
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Apr 16, 2017
1 parent 56b6d12 commit 9586323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/deliverservice/deliveryclient_test.go
Expand Up @@ -76,7 +76,7 @@ func (*mockMCS) ValidateIdentity(peerIdentity api.PeerIdentityType) error {

func TestNewDeliverService(t *testing.T) {
defer ensureNoGoroutineLeak(t)()
gossipServiceAdapter := &mocks.MockGossipServiceAdapter{GossipBlockDisseminations: make(chan uint64)}
gossipServiceAdapter := &mocks.MockGossipServiceAdapter{GossipBlockDisseminations: make(chan uint64, 1)}
factory := &struct{ mockBlocksDelivererFactory }{}

blocksDeliverer := &mocks.MockBlocksDeliverer{}
Expand Down Expand Up @@ -110,7 +110,7 @@ func TestNewDeliverService(t *testing.T) {
assert.Error(t, service.StopDeliverForChannel("TEST_CHAINID2"), "can't stop delivery")

// Let it try to simulate a few recv -> gossip rounds
time.Sleep(time.Duration(10) * time.Millisecond)
time.Sleep(time.Second)
assert.NoError(t, service.StopDeliverForChannel("TEST_CHAINID"))
time.Sleep(time.Duration(10) * time.Millisecond)
// Make sure to stop all blocks providers
Expand Down

0 comments on commit 9586323

Please sign in to comment.