More debug for intermittent failures
This commit is contained in:
parent
228600caf5
commit
78b03c5b8e
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue