replace setInterval with setTimeout in datasource.coffee
valentinzberea opened this issue · comments
Valentin Zberea commented
Right now the expired collections are collected every 10 seconds by checkForUnusedCollections
method:
setInterval(@checkForUnusedCollections, @checkIntervalForUnusedCollections)
In order to make tests run faster I would like to be able to override checkIntervalForUnusedCollections
property. This would be achieved by replacing setInterval with setTimeout and schedule another callback at the end of checkForUnusedCollections
method.
@uberVU/mozaic-core-commiters
Andrei-Adnan Ismail commented
You can make time pass faster with Sinon :) It has a "fast forward" feature.