Fixed interrupt-status related issue in test code where reused threads were re-interrupted as the interrupt status was not cleared