Tests: fix TestShutdownTCP race using NotifyStartedFunc