finally addressed dead lock issue using lock mechanism (monitor). tests are consistently succeeding now.