Comment 2 for bug 974617

I'm not able to dupe this after repeated attempts in a non-parallel lxc lucid container. Intermittent issues often signal timing issues, and the possibility that jumps out to me is that the bouncer isn't quite started yet. In pgbouncer.fixture.PGBouncerFixture.start, the code waits to see the bouncer's pid. Perhaps the presence of the bouncer's pid is not sufficient to indicate that the bouncer is ready. In that case, a proper fix might be to change bouncer code so that the pid is in fact a reliable indicator; or to change the fixture to look for some other more reliable signal. A more temporary fix (and/or an easier indication that this hypothesis has merit) might be to retry the assertion in this test a few time with a time.sleep(0.5) between each attempt. Working with a pgbouncer dev might be helpful.