Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash_reports: add optional timeout to get_new_sysdiagnose #776

Closed

Conversation

StephenGemin
Copy link
Contributor

@StephenGemin StephenGemin commented Jan 10, 2024

If there are any issues collecting sysdiagnose archive, it could potentially hang at this API. This provides a backwards compatible way for fully automated (and unmonitored) test applications to continue with execution.

Updates

  • add optional timeout keyword to get_new_sysdiagnose signature
  • on timeout raise error SysdiagnoseTimeoutError

@StephenGemin StephenGemin force-pushed the bugfix/sysdiagnose-timeout branch from d0fae21 to a5789fb Compare January 10, 2024 21:14
@StephenGemin StephenGemin force-pushed the bugfix/sysdiagnose-timeout branch from a5789fb to 0ee8664 Compare January 16, 2024 05:49
@StephenGemin StephenGemin force-pushed the bugfix/sysdiagnose-timeout branch from 0ee8664 to 06de161 Compare January 17, 2024 01:25
* on timeout raise error `SysdiagnoseTimeoutError`
@StephenGemin StephenGemin force-pushed the bugfix/sysdiagnose-timeout branch from 06de161 to a7ed5be Compare January 17, 2024 01:27

@pytest.mark.parametrize(
('end_time', 'return_value'),
((-1, True), (0, True), (10, False), (None, False))
Copy link
Owner

Choose a reason for hiding this comment

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

this test fails

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @doronz88 , is there a way that I can contribute to this PR?

Copy link
Owner

Choose a reason for hiding this comment

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

Feel free to fix this test yourself

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, but that will create a new PR, won't it? I was thinking on this PR, which I cannot edit (or it seems so)

@dario-br
Copy link
Contributor

Hey @StephenGemin , I find this PR very interesting to be added. But I just realised that the PR #847 I submitted, even if complementary, may yield conflicts when trying to incorporate yours. Please take a look to the new code of get_new_sysdiagnose.

Looking forward to having your PR on the master branch!

dario-br added a commit to dario-br/pymobiledevice3 that referenced this pull request Mar 6, 2024
@doronz88 doronz88 closed this Mar 6, 2024
@StephenGemin StephenGemin deleted the bugfix/sysdiagnose-timeout branch April 25, 2024 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants