spark test robust to spark absense