tests: samples: Fix potential deadlock on teardown
tests: samples: Fix potential deadlock on teardown

Fix #362

chouquette/medialibrary,chouquette/medialibrary,chouquette/medialibrary,chouquette/medialibrary