[FAB-4497] Fix panic in TestEndedGoroutines
[FAB-4497] Fix panic in TestEndedGoroutines

This fixes a possible panic in the test, that is
caused by a missing length check

Change-Id: I3afd31aa4ace3ab2237b192ec9ee4090bca77d12
Signed-off-by: Yacov Manevich <632344b5da9bd743456189af4db4b56472defb8c@il.ibm.com>

kchristidis/fabric,manish-sethi/fabric-sidedb,ckeyer/fabric,Ryan--Yang/fabric,Ryan--Yang/fabric,ckeyer/fabric,manish-sethi/fabric-sidedb,blockc/fabric,ibmmark/fabric,kchristidis/fabric,ckeyer/fabric,blockc/fabric,thakkarparth007/fabric,manish-sethi/fabric-sidedb,kchristidis/fabric,hyperledger/fabric,Ryan--Yang/fabric,mqshen/fabric,muralisrini/fabric,blockc/fabric,muralisrini/fabric,manish-sethi/fabric-sidedb,muralisrini/fabric,magg/fabric,binhn/fabric,chrisguoado/fabric,cophey/fabric,mqshen/fabric,kchristidis/fabric,mqshen/fabric,manish-sethi/fabric-sidedb,kchristidis/fabric,Ryan--Yang/fabric,thakkarparth007/fabric,ibmmark/fabric,cophey/fabric,Ryan--Yang/fabric,xixuejia/fabric,cophey/fabric,chrisguoado/fabric,stemlending/fabric,chrisguoado/fabric,kchristidis/fabric,hyperledger/fabric,Ryan--Yang/fabric,ckeyer/fabric,xixuejia/fabric,magg/fabric,magg/fabric,mqshen/fabric,chrisguoado/fabric,lukehuangch/fabric,manish-sethi/fabric-sidedb,stemlending/fabric,magg/fabric,ckeyer/fabric,lukehuangch/fabric,lukehuangch/fabric,manish-sethi/fabric,cophey/fabric,cophey/fabric,lukehuangch/fabric,thakkarparth007/fabric,chrisguoado/fabric,ckeyer/fabric,ibmmark/fabric,mqshen/fabric,stemlending/fabric,blockc/fabric,kchristidis/fabric,ibmmark/fabric,magg/fabric,jimthematrix/fabric,magg/fabric,ibmmark/fabric,manish-sethi/fabric,ibmmark/fabric,thakkarparth007/fabric,magg/fabric,blockc/fabric,manish-sethi/fabric-sidedb,thakkarparth007/fabric,blockc/fabric,blockc/fabric,lukehuangch/fabric,thakkarparth007/fabric,mqshen/fabric,lukehuangch/fabric,chrisguoado/fabric,chrisguoado/fabric,cophey/fabric,mqshen/fabric,xixuejia/fabric,Ryan--Yang/fabric,ibmmark/fabric,binhn/fabric,lukehuangch/fabric,binhn/fabric,ckeyer/fabric,stemlending/fabric,thakkarparth007/fabric,jimthematrix/fabric,cophey/fabric