From 0ba651a79bd35574151b4ff1e4e4bf9b8f20fe02 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Thu, 17 Jul 2014 19:10:54 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20create=20Connection=20until=20l?= =?UTF-8?q?ivedata=20test=20runs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for “livedata - publisher errors” --- packages/livedata/livedata_tests.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/livedata/livedata_tests.js b/packages/livedata/livedata_tests.js index 07bd42e779..6cf075a703 100644 --- a/packages/livedata/livedata_tests.js +++ b/packages/livedata/livedata_tests.js @@ -526,16 +526,18 @@ if (Meteor.isClient) { ]); testAsyncMulti("livedata - publisher errors", (function () { - // Use a separate connection so that we can safely check to see if - // conn._subscriptions is empty. - var conn = new LivedataTest.Connection('/', - {reloadWithOutstanding: true}); - var collName = Random.id(); - var coll = new Meteor.Collection(collName, {connection: conn}); + var conn, collName, coll; var errorFromRerun; var gotErrorFromStopper = false; return [ function (test, expect) { + // Use a separate connection so that we can safely check to see if + // conn._subscriptions is empty. + conn = new LivedataTest.Connection('/', + {reloadWithOutstanding: true}); + collName = Random.id(); + coll = new Meteor.Collection(collName, {connection: conn}); + var testSubError = function (options) { conn.subscribe("publisherErrors", collName, options, { onReady: expect(),