Fix TestAuthModeAlwaysAllow.

Fix #2137
Merge pull request #2138 from dchen1107/master

Fix TestAuthModeAlwaysAllow.