Support: serverCloseComplete option (#5937)
* Support: serverCloseComplete option Callback when server has fully shutdown. Please check that all cases are covered. * handle error on startup * fix tests * test workaround * remove serverCloseComplete chech on startup failure
This commit is contained in:
@@ -62,6 +62,7 @@ describe('Server Url Checks', () => {
|
||||
collectionPrefix: 'test_',
|
||||
});
|
||||
}
|
||||
let close = false;
|
||||
const newConfiguration = Object.assign({}, defaultConfiguration, {
|
||||
databaseAdapter,
|
||||
serverStartComplete: () => {
|
||||
@@ -71,10 +72,14 @@ describe('Server Url Checks', () => {
|
||||
done.fail('Close Server Error');
|
||||
}
|
||||
reconfigureServer({}).then(() => {
|
||||
expect(close).toBe(true);
|
||||
done();
|
||||
});
|
||||
});
|
||||
},
|
||||
serverCloseComplete: () => {
|
||||
close = true;
|
||||
},
|
||||
});
|
||||
const parseServer = ParseServer.start(newConfiguration);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user