SENTRY-342 fix testcase failed after adding grant check