fixed test suite. It stopped working because of previous adoptions on the gc behavior. I failed to notice it..

This commit is contained in:
Kevin Jahns
2017-04-27 14:58:08 +02:00
parent a126a29876
commit 47d5899058
5 changed files with 38 additions and 15 deletions

View File

@@ -147,11 +147,15 @@ module.exports = function (Y) {
return Y.utils.globalRoom.flushAll()
}
disconnect () {
var waitForMe = Promise.resolve()
if (!this.isDisconnected()) {
globalRoom.removeUser(this.userId)
super.disconnect()
waitForMe = super.disconnect()
}
return this.y.db.whenTransactionsFinished()
var self = this
return waitForMe.then(function () {
return self.y.db.whenTransactionsFinished()
})
}
flush () {
var self = this