In fact, perhaps they should run somewhere else by default.
Here's a patch:
The only limitation is that 180-http-proxy.t will fail if something is running on 5985 or 5986.
Updated the branch with a patch that runs the _test resource on a random port and tries to connect to an IANA reserved port for the _error resource.
Added another patch. Now the server always listens on an unused port during the etap unit tests, so there's no chance of eaddrinuse collisions with other instances of CouchDB.
Can i get a compare view link for that branch?
Looks like you haven't pushed to trunk in awhile.
Unit tests fire up a couch on a random port now.
That's one way to get a compare view. XD
Oh, whoops! Missed your message Paul. I figured this one didn't need too much review since it's only touching test code. By the way, this link gives a decent compare:
since it uses apache:trunk as the default. I don't know why rnewson's patch is on there, probably because it's picked from his git branch instead of the git-svn version.
Heh, no biggy. When I saw your comment about the extra patch I thought you meant take a peek. I'm sure its fine I was mostly just curious to see how you fixed the random port generation.
Ah, yeah, that's mochiweb_socket_server:get(couch_httpd, port), which relies on a cached result of inet:port(Socket) underneath.
Though that should also depend on setting the port to 0 in the config file, which, near as I can tell, you only do for the http proxy tests. Did you mean to add a third ini file to override that in test_utils:config_files()?
Yep, in the final version I believe that's exactly what I did:
A call to test_util:config_files() pulls in random_port.ini, which sets [httpd] port = 0