Skip to content

Commit c2beb66

Browse files
authored
[Backport 1.9] COMPASS 2159 Switch to TravisCI container-based infrastructure (#1255) (#1258)
* 🔥 Remove #databases dropDatabase('music') call It was not created by this test, so if it's needed it would be for earlier test runs? I don't see value in keeping it. Plus - it might be how the chain of test timeouts gets broken? Let's find out with another test. * 🐛 Handle the case where app is undefined This should be the second failure in at least one of the "main failure chain" pairs, i.e. https://travis-ci.com/10gen/compass/jobs/92384423 (but not) https://travis-ci.com/10gen/compass/jobs/92384429 * 🐛 Handle app null as well as undefined https://travis-ci.com/10gen/compass/jobs/92556220 * 🚧 Try container-based infrastructure Just seeing if it's a cheap win today. https://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/ * 🎨 Remove clickDatabaseInSidebar/waitForSidebar calls They are redundant as they are already done by goToCollection, which is at least a code smell worthwhile removing. * noop * Revert "noop" * noop * Revert "noop" * noop * Revert "noop" * noop * Revert "noop" * noop * Revert "noop" #retry 1) CollectionsStore "before all" hook: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. https://travis-ci.com/10gen/compass/jobs/93287442
1 parent 343c42f commit c2beb66

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: required
1+
sudo: false
22
dist: trusty
33
language: node_js
44
node_js:

test/functional/databases.test.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@ describe('#databases', function() {
3939
});
4040
});
4141

42-
after(function(done) {
43-
dataService.connect(function() {
44-
dataService.dropDatabase('music', function() {
45-
dataService.disconnect();
46-
done();
47-
});
48-
});
49-
});
50-
5142
context('when the escape key is pressed', function() {
5243
it('closes the create databases modal', function() {
5344
return client

test/functional/schema.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ describe('#schema', function() {
6262

6363
it('shows a schema on refresh', function() {
6464
return client
65-
.clickDatabaseInSidebar('music')
66-
.waitForSidebar('collection')
6765
.goToCollection('music', 'artists')
6866
.clickApplyFilterButtonFromSchemaTab()
6967
.waitForStatusBar()

test/functional/support/spectron-support.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ function launchCompass() {
6565
* Call quitCompass in afterEach for all UI tests:
6666
6767
* @param {Object} app - The running application
68-
* @param {Function} done - The callback to execute when finished.
6968
*
70-
* @returns {Promise} Promise that resolves when app stops.
69+
* @returns {Promise} Promise that resolves when app stops or is undefined.
7170
*/
7271
function quitCompass(app) {
72+
if (app === undefined || app === null) {
73+
return Promise.resolve();
74+
}
7375
return app.quit();
7476
}
7577

0 commit comments

Comments
 (0)