Author: bodewig
Date: Wed Sep  7 07:58:26 2011
New Revision: 1166034

URL: http://svn.apache.org/viewvc?rev=1166034&view=rev
Log:
properly shutdown remoting infrastructure in tests so test can be rerun

Modified:
    logging/log4net/trunk/tests/src/Appender/RemotingAppenderTest.cs

Modified: logging/log4net/trunk/tests/src/Appender/RemotingAppenderTest.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/Appender/RemotingAppenderTest.cs?rev=1166034&r1=1166033&r2=1166034&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/Appender/RemotingAppenderTest.cs (original)
+++ logging/log4net/trunk/tests/src/Appender/RemotingAppenderTest.cs Wed Sep  7 
07:58:26 2011
@@ -222,7 +222,7 @@ namespace log4net.Tests.Appender
                        }
                }
 
-               /// <summary>
+        /// <summary>
                /// Shuts down any loggers in the hierarchy, along
                /// with all appenders.
                /// </summary>
@@ -254,6 +254,22 @@ namespace log4net.Tests.Appender
                        ResetRepository();
                }
 
+        /// <summary>
+        /// Close down remoting infrastructure
+        /// </summary>
+        [TestFixtureTearDown]
+        public void UnregisterRemotingServerChannel() {
+            if (m_remotingChannel != null) {
+                ((TcpChannel) m_remotingChannel).StopListening(null);
+                try {
+                    ChannelServices.UnregisterChannel(m_remotingChannel);
+                }
+                catch (Exception) {
+                }
+                m_remotingChannel = null;
+            }
+        }
+
                /// <summary>
                /// Configures the root appender for counting and rolling
                /// </summary>


Reply via email to