test: fix flaky postgres broker test (#3172)