Closed e-tobi closed 2 years ago
I will have look during my day tomorrow and keep you posted.
@e-tobi waiting for server startup is already there and the default wait time is 10secs. I can expose the property for end users to set a the wait time like say 30 secs.
Sorry! I've posted this to the totally wrong project! This issue was meant for https://github.com/atrauzzi/protoculture-dotnet-postgres. mysticmind-postgresembed works just fine, but I needed a solution to run on Linux as well.
Starting the server hangs while waiting for "database system is ready to accept connections" in STDOUT from the PostgreSQL server. Worked fine on Linux, but on a German Windows 10 the output is "Datenbanksystem ist bereit, um Verbindungen anzunehmen", so the start task never ends.
I couldn't figure out how to tweak the output languang of postgres.exe. I've tried setting LANG, LC_ALL and LC_MESSAGES in the environment variables, but Postgres always writes German messages.
Maybe it would be better to wait for the server by trying to connect to it. Something like:
(Not a complete solution - needs to take care of the server process ending before the timeout and setting the Running status property - but you get the idea - I can provide a PR if you like.)