Try to extract this server starting up and shutting down into a JUnit rule like https://github.com/crawljax/crawljax/blob/master/core/src/test/java/com/crawljax/test/RunWithWebServer.java

Also, try not to work with threads. Threads are horrible to manage. In stead you could either call start and stop on the Jetty server itself by exposing those and not using the `main` method. You could also do the trick you do now but then dump the Runnable in a `Executors.newSingleThreadExecutor()`. Once the tests are done you can call `shutdownNow(); awaitTermination(..)` to kill the thread in a proper way.

These selenium tests also something hang. To prevent this from affecting the tests to much, it might also be a good idea to make use of JUnit's [TimeOut rule](http://junit-team.github.io/junit/javadoc/4.10/org/junit/rules/Timeout.html)