Enhance unit test master lookup resilience