The power of cycle testing

Long ago, I learned the power of cycle reboot testing for Embedded Linux systems:

One of the most stressful things a system does is boot, and if you can boot 1000’s of times with no failures, that is good.

I’m learning similar things with testing complex Go apps – if you run your tests in a loop, you often uncover obscure bugs that don’t show up if you only run your tests once – especially in highly concurrent systems where there is lots going on.

Something like this is very useful:



while true; do
  echo "running test ..."
  go clean -testcache
  if ! go test -race ./client/; then
    echo "test failed at count: $count"
  count=$((count + 1))
  echo "count: $count"
1 Like