tests don't check if there is an existing slapd process running before they start a new one
Closed this issue · 5 comments
Currently it's easy for tests to either cause fail for no good reason or to hang indefinitely if there is a stray process occupying the port.
It's very easy to check if something is using the port before starting a test, we should do this.
Ideally we should be able to pick a random port that is not being used, and automatically adjust the configuration at run time.
This may not be so easy (especially considering potential race conditions between picking a port and having slapd actually claim that port), but would solve the problem of multiple test runs on the one computer (including inside chroots) conflicting with each other.
We should still check if there is a process running on the port we intend to use. Using random ports will just random failures, instead of every test failing.
Patches welcome :-)
Fixing this, I suspect, might involve changes to django-tldap, which reminds me, I really should put django-tldap on Gerrit.
Now fixed in Karaage-Cluster/python-tldap@60746e1.