tests: samples: Fix potential deadlock on teardown

Fix #362
4 jobs for !452 with fix_test_deadlock in 2 minutes and 52 seconds (queued for 10 seconds)
merge request