Buggy code:
public class JettySolrRunner { Server server ; FilterHolder dispatchFilter ; String context ; private String solrConfigFilename ; private String schemaFilename ; private boolean waitOnSolr = false ; private int lastPort ; private String shards ; private String dataDir ; private volatile boolean startedBefore = false ; private String solrHome ; private boolean stopAtShutdown ; public JettySolrRunner ( String solrHome , String context , int port ) { } public JettySolrRunner ( String solrHome , String context , int port , String solrConfigFilename , String schemaFileName ) { } public JettySolrRunner ( String solrHome , String context , int port , String solrConfigFilename , String schemaFileName , boolean stopAtShutdown ) { } private void init ( String solrHome , String context , int port , boolean stopAtShutdown ) { this . context = context ; server = new Server ( port ) ; this . solrHome = solrHome ; this . stopAtShutdown = stopAtShutdown ; server . setStopAtShutdown ( stopAtShutdown ) ; System . setProperty ( "solr.solr.home" , solrHome ) ; if ( ( System . getProperty ( "jetty.testMode" ) ) != null ) { SocketConnector connector = new SocketConnector ( ) ; connector . setPort ( port ) ; connector . setReuseAddress ( true ) ; QueuedThreadPool threadPool = ( ( QueuedThreadPool ) ( connector . getThreadPool ( ) ) ) ; if ( threadPool != null ) { <START_BUG> threadPool . setMaxStopTimeMs ( 100 ) ; <END_BUG> } server . setConnectors ( new Connector [ ] { connector } ) ; server . setSessionIdManager ( new HashSessionIdManager ( new Random ( ) ) ) ; } else { for ( Connector connector : server . getConnectors ( ) ) { if ( connector instanceof SocketConnector ) { QueuedThreadPool threadPool = ( ( QueuedThreadPool ) ( ( ( SocketConnector ) ( connector ) ) . getThreadPool ( ) ) ) ; if ( threadPool != null ) { threadPool . setMaxStopTimeMs ( 100 ) ; } } } } final Context root = new Context ( server , context , Context . SESSIONS ) ; server . addLifeCycleListener ( new LifeCycle . Listener ( ) { public void lifeCycleStopping ( LifeCycle arg0 ) { System . clearProperty ( "hostPort" ) ; } public void lifeCycleStopped ( LifeCycle arg0 ) { } public void lifeCycleStarting ( LifeCycle arg0 ) { synchronized ( JettySolrRunner . this ) { waitOnSolr = true ; JettySolrRunner . this . notify ( ) ; } } public void lifeCycleStarted ( LifeCycle arg0 ) { lastPort = getLocalPort ( ) ; System . setProperty ( "hostPort" , Integer . toString ( lastPort ) ) ; if ( ( solrConfigFilename ) != null ) System . setProperty ( "solrconfig" , solrConfigFilename ) ; if ( ( schemaFilename ) != null ) System . setProperty ( "schema" , schemaFilename ) ; dispatchFilter = root . addFilter ( SolrDispatchFilter . class , "*" , REQUEST ) ; if ( ( solrConfigFilename ) != null ) System . clearProperty ( "solrconfig" ) ; if ( ( schemaFilename ) != null ) System . clearProperty ( "schema" ) ; System . clearProperty ( "solr.solr.home" ) ; } public void lifeCycleFailure ( LifeCycle arg0 , Throwable arg1 ) { System . clearProperty ( "hostPort" ) ; } } ) ; root . addServlet ( JettySolrRunner . Servlet404 . class , "//*" ) ; } public FilterHolder getDispatchFilter ( ) { } public boolean isRunning ( ) { } public boolean isStopped ( ) { } public void start ( ) throws Exception { } public void start ( boolean waitForSolr ) throws Exception { } public void stop ( ) throws Exception { } public int getLocalPort ( ) { } public static class Servlet404 extends HttpServlet { @ Override public void service ( HttpServletRequest req , HttpServletResponse res ) throws IOException { } } public static void main ( String [ ] args ) { } public void setShards ( String shardList ) { } public void setDataDir ( String dataDir ) { } }

Fix:
threadPool . setMaxStopTimeMs ( 1000 ) ;