qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Allocating ports in tests
Date Tue, 31 Jul 2012 16:19:19 GMT
I'm looking for ideas about how to allocate ports for tests.

Our test suite generally runs brokers with --port 0 in order to pick an
available port. That works well in most cases.

The problem case I have is the new HA code. Brokers and clients of a
cluster expect the cluster to have fixed addresses & ports. If I kill
and restart a broker during a test it needs to come up on the same port.

Currently the HA tests use --port 0 and hope for the best, which works
almost all the time. It does however give some spurious test failures,
because some other process grabs the port in the time between stopping
qpidd and restarting it.

Does anyone know a good, simple scheme to allocate ports like this? It
needs to allow multiple test runs on the same host without collisions. 


To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message