MT#4871 fix domain test

the skip part was never executed
also make it more robust