From 996566419c31b9f99f48467d040ae57f0ac173c3 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 4 May 2016 17:14:39 +0200 Subject: [PATCH] some flush updates --- src/Connectors/Test.js | 2 +- src/SpecHelper.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Connectors/Test.js b/src/Connectors/Test.js index 8c14b047..9492eb27 100644 --- a/src/Connectors/Test.js +++ b/src/Connectors/Test.js @@ -81,7 +81,7 @@ module.exports = function (Y) { } else { resolve() } - }, 10) + }, 0) } } globalRoom.whenTransactionsFinished().then(nextFlush) diff --git a/src/SpecHelper.js b/src/SpecHelper.js index 5e5bd07b..5683962d 100644 --- a/src/SpecHelper.js +++ b/src/SpecHelper.js @@ -139,8 +139,7 @@ g.applyRandomTransactionsWithGC = async(function * applyRandomTransactions (user }) g.garbageCollectAllUsers = async(function * garbageCollectAllUsers (users) { - // gc two times because of the two gc phases (really collect everything) - yield wait(100) + yield Y.utils.globalRoom.flushAll() for (var i in users) { yield users[i].db.emptyGarbageCollector() } @@ -254,7 +253,6 @@ g.createUsers = async(function * createUsers (self, numberOfUsers, database, ini Y.utils.globalRoom.users[u].y.destroy() } self.users = null - yield wait() var promises = [] for (var i = 0; i < numberOfUsers; i++) {