[build] Fix failing tests.

(cherry picked from commit 494ca9bb6616ac075e4be9fb008d463f8b3f85cf)