finally fixed deadlock test design