Fix test failure with changes to thread management.