From 8b78f5882d2f2a58c33c91a4dffb07738bdacd9f Mon Sep 17 00:00:00 2001 From: Peter Schmidt Date: Wed, 9 Aug 2017 03:42:27 +1000 Subject: [PATCH] COMPASS 1679 Reorder data-service setup to avoid instance refresh (#1192) * Add some debugging statements * Add DEBUG=* to Travis * Drop travis to just the required functional subset Should avoid the extremely verbose logs from enzyme tests as well, e.g. https://api.travis-ci.com/jobs/85808677/log.txt?deansi=true&access_token=X8EJCyqCWec556MVGCK4qg * Add more output Very interesting Travis log from previous run: https://travis-ci.com/10gen/compass/jobs/85809471 Parallels to COMPASS 1056 as well... * :shirt: * Move data service setup to before Compass starts Avoids the need to fiddle with the .clickInstanceRefreshIcon() and .waitForInstanceRefresh() entirely, but if it does work, it would probably not resolve COMPASS 1056 as that would require a similar setup refactoring. * Reverse debugging changes * noop * noop * Revert "noop" --- test/functional/collections.test.js | 41 +++++++++++++---------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/test/functional/collections.test.js b/test/functional/collections.test.js index 00a87f97df4..e3c7b27ecf3 100644 --- a/test/functional/collections.test.js +++ b/test/functional/collections.test.js @@ -13,38 +13,33 @@ describe('#collections', function() { let app = null; let client = null; - before(function() { - return launchCompass().then(function(application) { - app = application; - client = application.client; - client.connectToCompass({ hostname: 'localhost', port: 27018 }); + const dataService = new DataService(CONNECTION); + before(function(done) { + dataService.connect(function() { + dataService.createCollection('music.artists', {}, function() { + done(); + }); }); }); - after(function() { - return quitCompass(app); + after(function(done) { + dataService.dropDatabase('music', function() { + dataService.disconnect(); + done(); + }); }); context('when creating & deleting collections', function() { - const dataService = new DataService(CONNECTION); - - before(function(done) { - dataService.connect(function() { - dataService.createCollection('music.artists', {}, function() { - return client - .clickInstanceRefreshIcon() - .waitForInstanceRefresh().then(function() { - done(); - }); - }); + before(function() { + return launchCompass().then(function(application) { + app = application; + client = application.client; + client.connectToCompass({ hostname: 'localhost', port: 27018 }); }); }); - after(function(done) { - dataService.dropDatabase('music', function() { - dataService.disconnect(); - done(); - }); + after(function() { + return quitCompass(app); }); context('when viewing the database', function() {