tests: make sure core is connected before starting config-policy tests
The config-policy test's setup does not wait for the core to connect to the server, leading to possible race condition that makes the unit tests hang. This fixes the issue by waiting for the connection to be done before a test can start.