Jan Nidzwetzki abf79f47fd Support for multiple BGW in scheduler mock
The current version of the BGW scheduler mock does not support multiple
background workers. If a second worker was registered, the reference to
the previously registered worker gets lost. So, the implementation of
the mock scheduler only waits for the latest registered worker before
updating the mocked current time, which causes a race condition. If the
previous workers are still active and logging messages after this point,
the messages are logged with the updated mocked time. This leads to a
non-deterministic behavior and test failures. For example:

  msg_no | mock_time |    application_name     |    msg
---------+-----------+-------------------------+----------------------
-      1 |         0 | Retention Policy [1002] | job 1002 [...]
[...]
+      1 |   1000000 | Retention Policy [1002] | job 1002 [...]
2023-09-21 08:33:42 +02:00
..
2023-06-26 10:59:19 +02:00
2023-09-19 11:56:27 +02:00
2023-09-19 14:40:31 +02:00
2022-09-23 11:40:48 +03:00
2022-09-23 11:40:48 +03:00