Setting up windows-7 specific logging for AnnotatedMaxMessageSize test failure
This commit is contained in:
parent
03eff51a25
commit
8e3921b615
|
@ -27,12 +27,14 @@ import java.security.AccessController;
|
|||
import java.security.PrivilegedAction;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.eclipse.jetty.util.Loader;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
|
||||
/**
|
||||
|
@ -109,6 +111,34 @@ public class Log
|
|||
safeCloseInputStream(in);
|
||||
}
|
||||
}
|
||||
|
||||
/* Next see if an OS specific jetty-logging.properties object exists in the classpath.
|
||||
* This really for setting up test specific logging behavior based on OS.
|
||||
*/
|
||||
String osName = System.getProperty("os.name");
|
||||
if (StringUtil.isNotBlank(osName))
|
||||
{
|
||||
osName = osName.toLowerCase(Locale.ENGLISH).replace(' ','-');
|
||||
testProps = Loader.getResource(Log.class,"jetty-logging-" + osName + ".properties");
|
||||
if (testProps != null)
|
||||
{
|
||||
InputStream in = null;
|
||||
try
|
||||
{
|
||||
in = testProps.openStream();
|
||||
__props.load(in);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
System.err.println("Unable to load " + testProps);
|
||||
e.printStackTrace(System.err);
|
||||
}
|
||||
finally
|
||||
{
|
||||
safeCloseInputStream(in);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Now load the System.properties as-is into the __props, these values will override
|
||||
* any key conflicts in __props.
|
||||
|
|
|
@ -110,7 +110,7 @@ public class AnnotatedMaxMessageSizeTest
|
|||
}
|
||||
}
|
||||
|
||||
@Test(timeout=4000)
|
||||
@Test(timeout=8000)
|
||||
public void testEchoTooBig() throws IOException, Exception
|
||||
{
|
||||
BlockheadClient client = new BlockheadClient(serverUri);
|
||||
|
|
|
@ -81,7 +81,7 @@ public class SessionSocket
|
|||
delim = true;
|
||||
}
|
||||
valueStr.append(']');
|
||||
System.err.println("valueStr = " + valueStr);
|
||||
LOG.debug("valueStr = {}", valueStr);
|
||||
sendString(valueStr.toString());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
org.eclipse.jetty.LEVEL=INFO
|
||||
|
||||
# org.eclipse.jetty.io.WriteFlusher.LEVEL=DEBUG
|
||||
org.eclipse.jetty.websocket.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.LEVEL=INFO
|
||||
# org.eclipse.jetty.websocket.common.io.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.server.ab.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.common.Parser.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.common.Generator.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.server.ab.Fuzzer.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.server.blockhead.LEVEL=DEBUG
|
||||
# org.eclipse.jetty.websocket.server.helper.LEVEL=DEBUG
|
||||
|
||||
### Show state changes on BrowserDebugTool
|
||||
# -- LEAVE THIS AT DEBUG LEVEL --
|
||||
org.eclipse.jetty.websocket.server.browser.LEVEL=DEBUG
|
||||
|
||||
### Disabling intentional error out of RFCSocket
|
||||
org.eclipse.jetty.websocket.server.helper.RFCSocket.LEVEL=OFF
|
||||
|
||||
### Hiding Stack Traces from various test cases
|
||||
org.eclipse.jetty.websocket.server.ab.ABSocket.STACKS=OFF
|
||||
org.eclipse.jetty.websocket.server.WebSocketCloseTest$FastFailSocket.STACKS=OFF
|
Loading…
Reference in New Issue