Mock the sleep by modifying collection time
Merge pull request #1157 from DataDog/leo/flakycollection

Mock the sleep by modifying collection time