Fix a ìll-mannered test which runs a infinte loop thread