Thanks for the comments Rohith Sharma K S & Steve Loughran,
Uploading a patch with incorporating both of your comments.
If wants to check NodeStausUpdator is in waiting state, probably can get thread state OR wait for thread state.
Yes this would be a better option as it would be more deterministic, thanks for the approach.
But in general i think this is not just test case issue but also issue with NodeStatusUpdaterImpl.sendOutofBandHeartBeat which is not only called by the Testcases but also when container is killed. Suppose in large cluster we have HB as 5 seconds and when current call is in progress then call to sendOutofBandHeartBeat has no impact and the information of completed container is not shared till the next interval. So in my opinion sendOutofBandHeartBeat should return boolean informing the caller weather its successfull or not and also we can support some additional logic to push NM's HB earlier than the interval suggested by RM when outOfBandHB was not successful. Thoughts ?