tests: prevent flooding google's open DNS server in the "check leak" testing mode.
refactor: avoided using the deprecated string.len() builtin.