diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index 02fa663a1fb..3ccb663e40c 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -705,7 +705,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http @Override public String toString() { - return String.format("SendCB@%x{s=%s,i=%s,cb=%s}",hashCode(),getState(),_info,_callback); + return String.format("%s[i=%s,cb=%s]",super.toString(),getState(),_info,_callback); } } diff --git a/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java index bba6166b181..844737026b0 100644 --- a/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java +++ b/jetty-spdy/spdy-server/src/test/java/org/eclipse/jetty/spdy/server/SPDYClientFactoryTest.java @@ -61,10 +61,15 @@ public class SPDYClientFactoryTest extends AbstractTest session.goAway(new GoAwayInfo(5, TimeUnit.SECONDS)); - // Sleep a while to allow the factory to remove the session - // since it is done asynchronously by the selector thread - TimeUnit.SECONDS.sleep(1); + for (int i=0;i<10;i++) + { + // Sleep a while to allow the factory to remove the session + // since it is done asynchronously by the selector thread + TimeUnit.SECONDS.sleep(1); + if (clientFactory.getSessions().isEmpty()) + return; + } - Assert.assertTrue(clientFactory.getSessions().isEmpty()); + Assert.fail(clientFactory.getSessions().toString()); } } diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java b/jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java index 71d41c735d0..b3b7012056e 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java @@ -376,7 +376,7 @@ public abstract class IteratingCallback implements Callback default: if (_state.compareAndSet(current, State.CLOSED)) { - onCompleteFailure(new IllegalStateException("Closed with pending callback "+current)); + onCompleteFailure(new IllegalStateException("Closed with pending callback "+this)); return; } } diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java b/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java index 3085a68735d..d76600c35e3 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java @@ -159,14 +159,11 @@ public class SharedBlockingCallback { if (_state == null) { - // TODO remove when feedback received on 435322 - if (cause==null) - LOG.warn("null failed cause (please report stack trace) ",new Throwable()); _state = cause==null?FAILED:cause; _complete.signalAll(); } else if (_state == IDLE) - throw new IllegalStateException("IDLE"); + throw new IllegalStateException("IDLE",cause); } finally {