升级后,单元测试在一小时后运行超时,而过去它们在 15 分钟内完成
我们将单元测试项目从 .NET 3.5 升级到 .NET 4.0。我们还将 NUnit 从 2.5.2 升级到 2.59。现在,单元测试会在 50 分钟后超时,而过去它们会在大约 15 分钟内完成。这些测试在我们的开发服务器上的 JetBrains TeamCity 6.0.2 上运行。有谁知道这可能是什么原因造成的?一些单独的测试现在最多需要 8 分钟。
谢谢,
杰森
We upgraded our unit test project from .NET 3.5 to .NET 4.0. We also upgraded NUnit from 2.5.2 to 2.59. Now the unit tests time out after 50 minutes when they used to finish in about 15 minutes. These tests are run on JetBrains TeamCity 6.0.2 on our dev server. Does anyone know what could cause this? Some individual tests take up to 8 minutes now.
Thanks,
Jason
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我想通了。在我们的域对象类的某些地方,我们在公共属性上有验证器(MS 企业库)。验证器引用项目资源文件中的密钥。我们的验证器中的资源密钥不存在。这导致了导致我们的单元测试超时的错误。我猜.NET 4.0 更加严格。感谢大家的建议。 - 杰森 -
Well, I figured it out. There were places on our domain object classes where we had validators (MS Enterprise Library) on public properties. The validators were referencing keys from the project's resource file. We had nonexistent resource keys in our validators. This was causing the errors which caused our unit tests to time out. I guess .NET 4.0 is being more strict. Thanks for everyone's suggestions. - Jason –