Avoid hard-coded value in test setup/teardown.
Merge pull request #15531 from zuhao/refactor_actionpack_request_test

Avoid hard-coded value in test setup/teardown.