[headless] wait for lifecycle manager to finish starting

before starting web server
This commit is contained in:
Torsten Grote
2018-12-05 16:08:03 -02:00
parent d857338ad0
commit a22d03d028
2 changed files with 3 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ constructor(
}
val dbKey = accountManager.databaseKey ?: throw AssertionError()
lifecycleManager.startServices(dbKey)
lifecycleManager.waitForStartup()
}
override fun stop() {

View File

@@ -24,10 +24,11 @@ constructor(
}
accountManager.createAccount(user, pass)
if (!accountManager.signIn(pass)) {
throw java.lang.AssertionError("Password invalid")
throw AssertionError("Password invalid")
}
val dbKey = accountManager.databaseKey ?: throw AssertionError()
lifecycleManager.startServices(dbKey)
lifecycleManager.waitForStartup()
}
override fun stop() {