class Gitlab::QA::Component::PostgreSQL

def wait_until_ready

def wait_until_ready
  start = Time.now
  begin
    run_psql 'template1'
  rescue StandardError
    sleep 5
    retry if Time.now - start < 60
    raise
  end
end