fix test_restart_master_long with better error handling
feedback from PR
Merge pull request #342 from Incubaid/fix-restart-master-long

fix test_restart_master_long with better error handling