DEV Community

Discussion on: Top 5 Unit Test Problems That Haunt Software Developers

Collapse
 
canro91 profile image
Cesar Aguirre

I've seem them all :) In a past project, we were testing retry mechanisms of handlers (think of additional actions after running a database transaction) and nobody reduced the retry count and delays inside the unit tests, so we had a test suite that literally ran in minutes doing nothing. Arrrggg! So if you have tests for retrying logic, reduce the delays inside your tests :)

Collapse
 
moozzyk profile image
Pawel Kadluczka

Ouch! We had a test that that ran for 40 seconds (1000000 iterations). It turned out it was effectively testing a random number generator from the standard library...