Fix e2e failure of events test.
Merge pull request #2717 from erictune/event_e2e_flake

Fix e2e failure of events test.