1

我们刚刚将我们的测试站从 Windows XP 切换到 Windows 7 并且出现了意想不到的问题。

我们使用 NUnit 2.5.9 运行测试,在 Windows XP 上运行期间的某个时间点,我们收到了来自 TeamCity 的警告:

[16:05:27][Step 2/16] 2013-09-20 16:05:28,181 [watchDog] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[16:05:27][Step 2/16] 2013-09-20 16:05:28,181 [1232] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[16:05:27][Step 2/16] 2013-09-20 16:05:28,181 [2684] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[16:05:27][Step 2/16] 2013-09-20 16:05:28,181 [5940] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[16:05:27][Step 2/16] 2013-09-20 16:05:28,181 [2724] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)

并弹出以下错误消息窗口:

在此处输入图像描述

但测试仍在运行并成功完成。

现在切换到 Windows 7,我们收到这些警告作为错误:

[10:48:31][Step 2/16] 2013-09-30 10:48:30,862 [watchDog] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[10:48:31][Step 2/16]
[10:48:31][Step 2/16] 2013-09-30 10:48:30,862 [564] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[10:48:31][Step 2/16] Unhandled Exception: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
[10:48:31][Step 2/16] 2013-09-30 10:48:30,862 [5088] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[10:48:31][Step 2/16]
[10:48:31][Step 2/16] 2013-09-30 10:48:30,865 [5840] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null)
[10:48:31][Step 2/16] Unhandled Exception: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
[10:48:31][Step 2/16] 2013-09-30 10:48:30,866 [4004] WARN JetBrains.Container.Log4netDefaultLoggerInitializer - Unhandled exception in current domain: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain., , (null).

出现相同的错误消息并且测试停止运行。到目前为止,我发现的简短解决方法只是关闭此错误窗口并继续运行测试。
我想知道是否有办法在 TeamCity 测试配置中以某种方式捕获此异常,或任何其他适当的解决方法?
谢谢

4

0 回答 0