diff options
author | Justin Clark-Casey (justincc) | 2012-06-27 00:00:49 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-27 00:01:51 +0100 |
commit | 5bec5bcf714a94129070cf1b6219984496cbd6c2 (patch) | |
tree | d9ee6879830f5676559ac4041a1bbed135f74279 /OpenSim/Tests/Common/TestHelpers.cs | |
parent | Replace "kill uuid" console command with the more consistent "delete object u... (diff) | |
download | opensim-SC-5bec5bcf714a94129070cf1b6219984496cbd6c2.zip opensim-SC-5bec5bcf714a94129070cf1b6219984496cbd6c2.tar.gz opensim-SC-5bec5bcf714a94129070cf1b6219984496cbd6c2.tar.bz2 opensim-SC-5bec5bcf714a94129070cf1b6219984496cbd6c2.tar.xz |
Automatically disable log4net before each regression test so that logging is confined to a single test if it's turned on.
This involves making test classes inherit from a common OpenSimTestCase.
This will be applied to more classes as required.
Diffstat (limited to 'OpenSim/Tests/Common/TestHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/TestHelpers.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Tests/Common/TestHelpers.cs b/OpenSim/Tests/Common/TestHelpers.cs index d38d692..30121fe 100644 --- a/OpenSim/Tests/Common/TestHelpers.cs +++ b/OpenSim/Tests/Common/TestHelpers.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common | |||
58 | </root> | 58 | </root> |
59 | </log4net>")); | 59 | </log4net>")); |
60 | 60 | ||
61 | private static Stream DisableLoggingConfigStream | 61 | private static MemoryStream DisableLoggingConfigStream |
62 | = new MemoryStream( | 62 | = new MemoryStream( |
63 | Encoding.UTF8.GetBytes( | 63 | Encoding.UTF8.GetBytes( |
64 | // "<?xml version=\"1.0\" encoding=\"utf-8\" ?><configuration><log4net><root><level value=\"OFF\"/><appender-ref ref=\"A1\"/></root></log4net></configuration>")); | 64 | // "<?xml version=\"1.0\" encoding=\"utf-8\" ?><configuration><log4net><root><level value=\"OFF\"/><appender-ref ref=\"A1\"/></root></log4net></configuration>")); |
@@ -109,6 +109,7 @@ namespace OpenSim.Tests.Common | |||
109 | public static void DisableLogging() | 109 | public static void DisableLogging() |
110 | { | 110 | { |
111 | log4net.Config.XmlConfigurator.Configure(DisableLoggingConfigStream); | 111 | log4net.Config.XmlConfigurator.Configure(DisableLoggingConfigStream); |
112 | DisableLoggingConfigStream.Position = 0; | ||
112 | } | 113 | } |
113 | 114 | ||
114 | /// <summary> | 115 | /// <summary> |