[build] Fixed failing tests.

(cherry picked from commit 8ac2787b566d5e2a6c763042668094881401a3e1)