Visual Studio 2012 缓慢的单元测试 [英] Visual studio 2012 slow unit testing
问题描述
最近在 VS2012 上运行单元测试非常慢,当我运行它们时,它们需要大约 12 秒才能开始实际测试.
Running unit tests on VS2012 is lately very slow, when I run them it takes about 12 seconds before they start actually testing.
当我调试它时,在我遇到第一个断点之前是同样的故事.
When I debug it is the same story before I hit the first breakpoint.
我连接了进程监视器,然后我发现了这个:
I hooked up process monitor and then I found this:
CreateFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON 成功
WriteFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON BAD NETWORK PATH
之后它会保持 9 秒的安静.
After that it stays 9 seconds quiet.
CloseFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON 成功
这到底是怎么回事?我根本找不到 MAILSLOT 和 Visual Studio 之间的任何关系,但现在已经持续了大约 2 周.
What on earth is going on here? I cannot find any relation between MAILSLOT and Visual Studio at all, but it is going on for about 2 weeks now.
推荐答案
我遇到了同样的问题,使用 VS2012 Update 1.基于 http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/20eb50e9-3e68-4d29-bcdd-a4fc166b9c00 我在我的 NIC 上通过 TCP 禁用了 NetBios.测试现在立即启动,procmon 显示 \MACHINE*\MAILSLOT\NET\NETLOGON 上的等待时间从 5 秒下降到大约 40 微秒.
I had the same issue, using VS2012 Update 1. Based on the suggestion in http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/20eb50e9-3e68-4d29-bcdd-a4fc166b9c00 I disabled NetBios over TCP on my NIC. The tests now start up immediately, and procmon shows the time waiting on \MACHINE*\MAILSLOT\NET\NETLOGON dropped from 5 seconds to about 40 microseconds.
这篇关于Visual Studio 2012 缓慢的单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!