Allow single server instance in test suite (#7262)
* 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
This commit is contained in:
@@ -50,9 +50,10 @@ function createParseServer(options) {
|
||||
describe_only_db('postgres')('Postgres database init options', () => {
|
||||
let server;
|
||||
|
||||
afterEach(() => {
|
||||
afterAll(done => {
|
||||
if (server) {
|
||||
server.close();
|
||||
Parse.serverURL = 'http://localhost:8378/1';
|
||||
server.close(done);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -73,7 +74,10 @@ describe_only_db('postgres')('Postgres database init options', () => {
|
||||
});
|
||||
return score.save();
|
||||
})
|
||||
.then(done, done.fail);
|
||||
.then(async () => {
|
||||
await reconfigureServer();
|
||||
done();
|
||||
}, done.fail);
|
||||
});
|
||||
|
||||
it('should fail to create server if schema databaseOptions does not exist', done => {
|
||||
@@ -83,6 +87,9 @@ describe_only_db('postgres')('Postgres database init options', () => {
|
||||
databaseOptions: databaseOptions2,
|
||||
});
|
||||
|
||||
createParseServer({ databaseAdapter: adapter }).then(done.fail, () => done());
|
||||
createParseServer({ databaseAdapter: adapter }).then(done.fail, async () => {
|
||||
await reconfigureServer();
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user