add test for stale tracker when state is stale
fix registry lock when checking nats connectivity

[finishes #51077967]