Bug 1071592 - [v2.1] Fix intermittent failure in test_keyboard.py