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

Add stopSession() and resumeSession() to public API #136

Merged
merged 9 commits into from
Mar 13, 2019

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Mar 7, 2019

Goal

Adds the ability to stop and resume sessions. This prevents the handled/unhandled error count from incrementing when a session is in the stopped state, which may be desirable if a user manually tracks sessions and does not care about crashes that occur in the background.

See previous PRs on Android and Cocoa for reference.

Changeset

  • Updated bugsnag-android from v4.11.0 to v4.12.0
  • Updated bugsnag-cocoa from v5.17.3 to v5.19.0
  • Added StopSession and ResumeSession to Bugsnag.cs
  • Added boolean flag to Session.cs to track whether a session is stopped or not
  • Updated SessionTracker.cs so that CurrentSession returns null if StopSession is called, which prevents session information from being added to the session payload.
  • Removed failing check_package task from Rakefile

Tests

  • Added unit tests to verify the behaviour of StartSession, ResumeSession, and StopSession.
  • Added stub classes to Tests/BugsnagUnity.Tests to allow for the construction of a SessionTracker in NUnit tests.
  • Changed some classes to internal and used [assembly: InternalsVisibleTo("class")] to make classes visible to unit tests
  • Manually verified that session information is not in an error payload when stopping a session, on Android + iOS.

Copy link

@sazap10 sazap10 left a comment

Choose a reason for hiding this comment

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

Seems fine having a quick sanity check through it

@fractalwrench fractalwrench changed the title [WIP] Add stopSession() and resumeSession() to public API Add stopSession() and resumeSession() to public API Mar 11, 2019
Add mazerunner scenarios for StopSession and ResumeSession
@fractalwrench fractalwrench merged commit 4784ad6 into next Mar 13, 2019
@fractalwrench fractalwrench deleted the stop-sessions branch March 13, 2019 09:59
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