QPID-2243, QPID-3658: update test to fix incorrect assumption that messages have already reached the broker Applied patch from Oleksandr Rudyy<orudyy@gmail.com> and myself.