Added diagnostics to TestDeadlockDetection