JUnit test with javax.websocket on embedded Jetty throws RejectedExecutionException: NonBlockingThread
问题 I'm trying to write a test case which creates a socket and connects to an embedded jetty instance. I'm using Jetty: 9.2.0.RC0 javax.websocket-api & javax.websocket-client-api: 1.0 javax.websocket server & client impl: 9.1.5.v20140505 Starting the embedded jetty server with the websocket servlet seems to work fine. I took some code from this example. However this line ... container.connectToServer(SocketClient.class, uri); ... throws this exception java.io.IOException: java.util.concurrent