utils: handle race condition gracefully (#1583)

* utils: handle race condition gracefully

* utils: add a test

* update Cargo.lock

* utils: remove a warning

* utils: init logger in tests

* utils: update the outdated comment

* util: wait for both subsystem and test_future to finish

* Revert "util: wait for both subsystem and test_future to finish"

This reverts commit 075b3924.
9 jobs for master in 27 minutes and 20 seconds (queued for 4 seconds)