Fix thread deadlock in unit test initialisation.