better debug from test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-03-07 17:15:05 +11:00
parent a128b87e3a
commit 8607387499
1 changed files with 11 additions and 3 deletions

View File

@ -325,13 +325,21 @@ public class ThreadStarvationTest
byte buf[] = new byte[1024];
while((len = in.read(buf,0,buf.length)) != -1)
try
{
for(int x=0; x<len; x++)
while((len = in.read(buf,0,buf.length)) != -1)
{
if(buf[x] == '!') bodyCount++;
for(int x=0; x<len; x++)
{
if(buf[x] == '!') bodyCount++;
}
}
}
catch(Throwable th)
{
_server.dumpStdErr();
throw th;
}
return bodyCount;
}
});