testing: fix logic in determining Hadoop master

Signed-off-by: Joe Buck <jbbuck@gmail.com>