Fix test: don't call function with empty queue