From e8fad2af2d10e404084a2a13de69551c84a387f0 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Wed, 13 Dec 2017 16:00:25 +0200 Subject: [PATCH] Define Sandbox `clients` when running `versioning hot code push test`. Since this test utilizes the `testWithAllClients` technique, which runs the tests in various clients/browsers, it's necessary for the tests `Sandbox` to define `clients`, otherwise the function within `testWithAllClients` will not be executed at all. This was causing this particular test to always return success (it was running without failure on exactly zero clients). Also the technique of setting `this.baseTimeout` appeared to cause problems, likely because it overrides various other values instead of using `waitSecs` (we don't use the `baseTimeout` technique in other places within self-tests either). Discovered during testing, as mentioned in https://github.com/meteor/meteor/pull/9439#pullrequestreview-83139232. --- tools/tests/hot-code-push.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/tests/hot-code-push.js b/tools/tests/hot-code-push.js index 23674d406b..ac05adb019 100644 --- a/tools/tests/hot-code-push.js +++ b/tools/tests/hot-code-push.js @@ -98,21 +98,22 @@ jquery`); }); selftest.define("versioning hot code push", function (options) { - var s = new Sandbox(); + var s = new Sandbox({ + clients: options.clients, + }); s.set("AUTOUPDATE_VERSION", "1.0"); s.createApp("myapp", "hot-code-push-test"); s.cd("myapp"); s.testWithAllClients(function (run) { - run.baseTimeout = 20; run.match("myapp"); run.match("proxy"); run.match("MongoDB"); run.match("running at"); run.match("localhost"); run.connectClient(); - run.waitSecs(20); + run.waitSecs(40); run.match("client connected: 0");