[FAB-13917] fix unit test in gossip election metrics
[FAB-13917] fix unit test in gossip election metrics

There is an intermittent test failure due to race condition
Fixed by using waitGroups at the appropiate spots

Change-Id: I4c80697230033ffefb922d654785646580f508fb
Signed-off-by: Hagar Meir <6d3fae9be567d337cd6461f97836a8e7a2123754@ibm.com>

manish-sethi/fabric,manish-sethi/fabric,stemlending/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,jimthematrix/fabric,hyperledger/fabric,manish-sethi/fabric-sidedb,stemlending/fabric,hyperledger/fabric,stemlending/fabric,muralisrini/fabric,muralisrini/fabric,manish-sethi/fabric-sidedb,binhn/fabric,manish-sethi/fabric-sidedb,muralisrini/fabric,stemlending/fabric,binhn/fabric,manish-sethi/fabric-sidedb,binhn/fabric,jimthematrix/fabric,manish-sethi/fabric-sidedb