github.com/Hnampk/fabric@v2.1.1+incompatible/gossip/privdata/pvtdataprovider_internal_test.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package privdata 8 9 import ( 10 "time" 11 ) 12 13 //go:generate counterfeiter -o mocks/sleeper.go --fake-name Sleeper . testSleeper 14 type testSleeper interface { 15 Sleep(time.Duration) 16 } 17 18 func SetSleeper(pdp *PvtdataProvider, sleeper testSleeper) { 19 pdp.sleeper.sleep = sleeper.Sleep 20 }