Skip to content

Commit

Permalink
Allow single server instance in test suite (#7262)
Browse files Browse the repository at this point in the history
* initial pass

* reconfigureServer when needed

* finish postgres tests

* mongo tests

* more tests

* clean up

* re-add skipped test

* Fix transaction tests

* handle batch

* AuthenticationAdapter fix

* More reconfiguration

* clean up

* properly terminate cli servers

* handle Parse.Push

* Flaky PushController

* ensure reconfigureServer when changed

* fix postgres tests

* remove console.log

* LiveQuery spec remove duplicates and listeners
  • Loading branch information
dplewis authored Mar 13, 2021
1 parent 8b0e8cd commit 9563793
Show file tree
Hide file tree
Showing 36 changed files with 940 additions and 1,019 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"form-data": "3.0.0",
"husky": "4.2.5",
"jasmine": "3.5.0",
"jasmine-spec-reporter": "6.0.0",
"jsdoc": "3.6.3",
"jsdoc-babel": "0.5.0",
"lint-staged": "10.2.3",
Expand Down
6 changes: 5 additions & 1 deletion spec/CLI.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@ describe('execution', () => {
const binPath = path.resolve(__dirname, '../bin/parse-server');
let childProcess;

afterEach(async () => {
afterEach(done => {
if (childProcess) {
childProcess.on('close', () => {
childProcess = undefined;
done();
});
childProcess.kill();
}
});
Expand Down
6 changes: 4 additions & 2 deletions spec/CloudCode.Validator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,8 @@ describe('cloud validator', () => {

const role2 = new Parse.Role('Admin2', roleACL);
role2.getUsers().add(user);
await Promise.all([role.save({ useMasterKey: true }), role2.save({ useMasterKey: true })]);
await role.save({ useMasterKey: true });
await role2.save({ useMasterKey: true });
await Parse.Cloud.run('cloudFunction');
done();
});
Expand Down Expand Up @@ -981,7 +982,8 @@ describe('cloud validator', () => {

const role2 = new Parse.Role('AdminB', roleACL);
role2.getUsers().add(user);
await Promise.all([role.save({ useMasterKey: true }), role2.save({ useMasterKey: true })]);
await role.save({ useMasterKey: true });
await role2.save({ useMasterKey: true });
await Parse.Cloud.run('cloudFunction');
done();
});
Expand Down
Loading

0 comments on commit 9563793

Please sign in to comment.