add sleep in tests and go fmt
Merge pull request #1101 from dotcloud/fix-unit_tests

add sleep in tests and go fmt