[v8.x] Cherry-pick fix for make test-v8 from master
#21534
Closed
make test-v8 from master
#21534