fix middleware test that fails because retry logic generates extra
log messages