Postgres: Properly initialize database on startup and debugger (#7255)

* PG: Properly initialize database

* fix flaky tests

* flaky test

* correct test

* no idea

* clean up debugger
This commit is contained in:
Diamond Lewis
2021-03-10 13:31:35 -06:00
committed by GitHub
parent bee889a329
commit 39fa17f914
16 changed files with 134 additions and 117 deletions

View File

@@ -75,11 +75,11 @@ class ParseServer {
this.config = Config.put(Object.assign({}, options, allControllers));
logging.setLogger(loggerController);
const dbInitPromise = databaseController.performInitialization();
const hooksLoadPromise = hooksController.load();
// Note: Tests will start to fail if any validation happens after this is called.
Promise.all([dbInitPromise, hooksLoadPromise])
databaseController
.performInitialization()
.then(() => hooksController.load())
.then(() => {
if (serverStartComplete) {
serverStartComplete();