How to make a unit test sleep for a specific period of time in visual studio pro version database?
using visual studio (database pro) 2008, i created a unit test (using SQL unit test) that tests multiple stored procedures in order.
The solution is to call each SP after a specified period of time, not within one second.
Thus the unit test fails and requires a short pause between each call.
Any ideas? is there a standard style function Thread.Sleep
that i can use?
+2
source to share
1 answer
Conditional tests that are slow are always bad. Having unit tests depending on each other (don't know if that's the case) is also bad.
Therefore, I highly recommend that you try building your code so you can test without delay. But if you really want latency WaitFor might be the solution (assuming SQL Server).
+2
source to share