GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-116622: Mock the passage of time in Android logcat rate limit tests by mhsmith · Pull Request #124015 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Sep 12, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

  • Issue: Add support for Android as a target platform #116622

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mhsmith
Mock the passage of time in Android logcat rate limit tests
e4cb124
@mhsmith mhsmith added skip news needs backport to 3.13 only security fixes labels Sep 12, 2024
@bedevere-app bedevere-app Bot added the awaiting review label Sep 12, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 12, 2024
Add support for Android as a target platform #116622
Closed
mhsmith
mhsmith commented Sep 12, 2024
View reviewed changes
Comment thread Lib/test/test_android.py
def tearDown(self):
self.logcat_process.terminate()
self.logcat_process.wait(LOOPBACK_TIMEOUT)
self.logcat_thread.join(LOOPBACK_TIMEOUT)

@mhsmith mhsmith Sep 12, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>} 

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_android.py
stream.write(obj)


class TestAndroidRateLimit(unittest.TestCase):

@mhsmith mhsmith Sep 12, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't read its own output, so it doesn't need the @skipIf or the setUp from the other class.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mhsmith
mhsmith requested a review from freakboy3742 September 12, 2024 17:38
freakboy3742
freakboy3742 approved these changes Sep 13, 2024
View reviewed changes

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Sep 13, 2024
@freakboy3742
Merge branch 'main' into android-rate-limit
b2bf343
@freakboy3742
freakboy3742 enabled auto-merge (squash) September 13, 2024 04:56
@freakboy3742
freakboy3742 merged commit f554883 into python:main Sep 13, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 13, 2024
@miss-islington-app

miss-islington-app Bot commented Sep 13, 2024

Copy link
Copy Markdown

Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 13, 2024
@mhsmith @freakboy3742 @miss-islington
pythongh-116622: Mock the passage of time in Android logcat rate limi…
522de6a
…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 <[email protected]>
Co-authored-by: Russell Keith-Magee <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 13, 2024

Copy link
Copy Markdown

GH-124035 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Sep 13, 2024
Yhg1s pushed a commit that referenced this pull request Sep 30, 2024
@miss-islington @mhsmith @freakboy3742
[3.13] gh-116622: Mock the passage of time in Android logcat rate lim…
d002e1f
…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 <[email protected]>
Co-authored-by: Russell Keith-Magee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@freakboy3742 freakboy3742 freakboy3742 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mhsmith @freakboy3742
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.