in file TimeForwarder, function stopForwarding
sth like the following would be nice ;)
TimeForwarder.prototype.stopForwarding = function() {
var that = this;
return new that.schedule.Promise(function(resolve, reject) {
if(that.isExpiringEvents()) {
return reject(new Error("Cannot release timers during event expiration. Currently at: << " +
that.timeServer.currentTime.toMilliseconds() + " >> ms, target: << " + that.timeServer.targetTime.toMilliseconds() +
" ms >>. Forwarding requested from: " + that.forwardingStartedSavedStack));
}
return resolve();
});
};
The faulty scenario was generated when advaceTime was in progress (but not returned as promise in test flow), then test ended and called releaseTimers.
in file TimeForwarder, function stopForwarding sth like the following would be nice ;)
TimeForwarder.prototype.stopForwarding = function() { var that = this; return new that.schedule.Promise(function(resolve, reject) { if(that.isExpiringEvents()) { return reject(new Error("Cannot release timers during event expiration. Currently at: << " + that.timeServer.currentTime.toMilliseconds() + " >> ms, target: << " + that.timeServer.targetTime.toMilliseconds() + " ms >>. Forwarding requested from: " + that.forwardingStartedSavedStack)); }
return resolve(); }); };
The faulty scenario was generated when advaceTime was in progress (but not returned as promise in test flow), then test ended and called releaseTimers.