Skip to content

Commit

Permalink
[FABG-707] Increase max time window on events test
Browse files Browse the repository at this point in the history
This change increases the max time window for the event test.
The filtered block event test is also modified to return immediately
upon sucess.

Change-Id: I76667bb76d286655744b311e4211f436f90c82da
Signed-off-by: Troy Ronda <[email protected]>
  • Loading branch information
troyronda committed Aug 10, 2018
1 parent 52884c8 commit cacc1a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/integration/pkg/fab/eventclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/test/integration"
)

const eventTimeWindow = 10 * time.Second // the amount of time to watch for events, in order to compare to expectations.
const eventTimeWindow = 30 * time.Second // the maximum amount of time to watch for events.

func TestEventClient(t *testing.T) {
chainCodeID := mainChaincodeID
Expand Down Expand Up @@ -225,7 +225,9 @@ func checkFilteredBlockEvent(wg *sync.WaitGroup, fbeventch <-chan *fab.FilteredB
// Not our event
continue
}
t.Logf("Received correct filtered block event: %#v", event)
atomic.AddUint32(numReceived, 1)
return
case <-time.After(eventTimeWindow):
return
}
Expand Down

0 comments on commit cacc1a7

Please sign in to comment.