If the tests are always being done on the same computer, it's possible it's a host controller issue. I have an older laptop that periodically receives Master Abort signals from the PCI bus hardware, which forces a hard reset of the host controller. Of course, this forces re-enumeration of all attached devices, which usually takes a few seconds.