gh-116622: Mock the passage of time in Android logcat rate limit tests#124015
Merged
freakboy3742 merged 2 commits intopython:mainfrom Sep 13, 2024
Merged
gh-116622: Mock the passage of time in Android logcat rate limit tests#124015freakboy3742 merged 2 commits intopython:mainfrom
freakboy3742 merged 2 commits intopython:mainfrom
Conversation
mhsmith
commented
Sep 12, 2024
| def tearDown(self): | ||
| self.logcat_process.terminate() | ||
| self.logcat_process.wait(LOOPBACK_TIMEOUT) | ||
| self.logcat_thread.join(LOOPBACK_TIMEOUT) |
Member
Author
There was a problem hiding this comment.
This fixes an unrelated warning I saw while running the tests repeatedly with -F:
Warning -- threading._dangling was modified by test_android
Warning -- Before: {<weakref at 0x7c15b68e00; to 'threading._MainThread' at 0x7c18f5fcb0>}
Warning -- After: {<weakref at 0x7c186e3ce0; to 'threading._MainThread' at 0x7c18f5fcb0>, <weakref at 0x7c1870ef20; to 'threading.Thread' at 0x7c183faa50>}
| stream.write(obj) | ||
|
|
||
|
|
||
| class TestAndroidRateLimit(unittest.TestCase): |
Member
Author
There was a problem hiding this comment.
This test doesn't read its own output, so it doesn't need the @skipIf or the setUp from the other class.
|
Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Sep 13, 2024
…t tests (pythonGH-124015) Mock the passage of time in Android logcat rate limit tests (cherry picked from commit f554883) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
|
GH-124035 is a backport of this pull request to the 3.13 branch. |
Yhg1s
pushed a commit
that referenced
this pull request
Sep 30, 2024
…it tests (GH-124015) (#124035) gh-116622: Mock the passage of time in Android logcat rate limit tests (GH-124015) Mock the passage of time in Android logcat rate limit tests (cherry picked from commit f554883) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The emulator on the buildbot is apparently subject to wild swings in performance, so the only way to make this test reliable is to take the test machine's real clock out of the equation.