Try to get correct buffer size to avoid races (#53547)

* Try to get correct buffer size to avoid races

  fixes #51393

* fix test, mock buffer function since all is mocked
This commit is contained in:
Brian Coca 2019-03-14 11:04:56 -04:00 committed by GitHub
parent 86405b8fe4
commit e280f2f7b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 18 deletions

View file

@ -83,6 +83,7 @@ def rc_am(mocker, am, mock_os, mock_subprocess):
am.fail_json = mocker.MagicMock(side_effect=SystemExit)
am._os = mock_os
am._subprocess = mock_subprocess
am.get_buffer_size = mocker.MagicMock(return_value=900)
yield am