Convert profile test to busywait to avoid Travis failures
Merge pull request #8628 from JuliaLang/teh/profile_test

Convert profile test to busywait to avoid Travis failures