Affects Version/s: None
Fix Version/s: None
This may be the reason why tests behave as crazy as they do on FreeBSD (lucene jenkins). Here's the story.
I looked at Solr logs and saw this:
just before failures related to "socket/ port already bound" in SSLMigrationTest. QueuedThreadPool in jetty attempts to wait for pool threads, then terminates them (and waits again). This wait time is configurable, alas broken in Solr's code in JettySolrRunner:
The threadPool variable here is always null because it gets assigned after jetty starts and the configuration block is executed before it. the threadPool != null condition is never true and the code that configures those timeouts is dead.
That's not a biggie, I fixed it. The problem remains, however – even with a long wait time, the threads in accept() call are not interrupted. I wrote a small test class:
If you run it on Windows, for example, here's the expected result:
Makes sense. On FreeBSD though, the result is:
Interestingly, the thread IS terminated after ctrl-c is pressed...
I think this is a showstopper since it violates the contract of accept(), which states: