tests: fix worker thread initialization