Issue #3151981 by daffie, Hardik_Patel_12, catch: Replace the database query with an entity query in NodeRevisionsAllTest