Issue #3151975 by daffie, narendra.rajwar27: Replace the database query with an entity query in NodeRevisionsTest (cherry picked from commit b52340d155426791a13641ea329dc19c6ad9a42a)