Skip to content

Commit ee0d657

Browse files
authored
COMPASS 1679 Reorder data-service setup to avoid instance refresh (#1192) (#1200)
* 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... * 👕 * 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"
1 parent 9b66f01 commit ee0d657

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

test/functional/collections.test.js

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,33 @@ describe('#collections', function() {
1313
let app = null;
1414
let client = null;
1515

16-
before(function() {
17-
return launchCompass().then(function(application) {
18-
app = application;
19-
client = application.client;
20-
client.connectToCompass({ hostname: 'localhost', port: 27018 });
16+
const dataService = new DataService(CONNECTION);
17+
before(function(done) {
18+
dataService.connect(function() {
19+
dataService.createCollection('music.artists', {}, function() {
20+
done();
21+
});
2122
});
2223
});
2324

24-
after(function() {
25-
return quitCompass(app);
25+
after(function(done) {
26+
dataService.dropDatabase('music', function() {
27+
dataService.disconnect();
28+
done();
29+
});
2630
});
2731

2832
context('when creating & deleting collections', function() {
29-
const dataService = new DataService(CONNECTION);
30-
31-
before(function(done) {
32-
dataService.connect(function() {
33-
dataService.createCollection('music.artists', {}, function() {
34-
return client
35-
.clickInstanceRefreshIcon()
36-
.waitForInstanceRefresh().then(function() {
37-
done();
38-
});
39-
});
33+
before(function() {
34+
return launchCompass().then(function(application) {
35+
app = application;
36+
client = application.client;
37+
client.connectToCompass({ hostname: 'localhost', port: 27018 });
4038
});
4139
});
4240

43-
after(function(done) {
44-
dataService.dropDatabase('music', function() {
45-
dataService.disconnect();
46-
done();
47-
});
41+
after(function() {
42+
return quitCompass(app);
4843
});
4944

5045
context('when viewing the database', function() {

0 commit comments

Comments
 (0)