Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

session should be exited state if state is ok #352

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Apr 14, 2020

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

a session should be ended with an exited state.

💡 Motivation and Context

the session was being ended always with abnormal if errorCount was > 0.
if there's an open session that should not be there and there's no ndk marker file, then it should be abnormal.

💚 How did you test it?

unit test

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing

🔮 Next steps

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Needs a test where status is OK and errors.count > 1?

@marandaneto
Copy link
Contributor Author

marandaneto commented Apr 14, 2020

Needs a test where status is OK and errors.count > 1?

don't think so, errorCount doesn't affect the status field at all.

@codecov-io
Copy link

codecov-io commented Apr 14, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@3052406). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #352   +/-   ##
=========================================
  Coverage          ?   58.98%           
  Complexity        ?      759           
=========================================
  Files             ?       87           
  Lines             ?     3528           
  Branches          ?      339           
=========================================
  Hits              ?     2081           
  Misses            ?     1298           
  Partials          ?      149           
Impacted Files Coverage Δ Complexity Δ
...try-core/src/main/java/io/sentry/core/Session.java 92.59% <ø> (ø) 28.00 <0.00> (?)
...c/main/java/io/sentry/core/cache/SessionCache.java 56.42% <100.00%> (ø) 23.00 <0.00> (?)
...in/java/io/sentry/core/SynchronizedCollection.java 35.29% <0.00%> (ø) 8.00% <0.00%> (?%)
...ain/java/io/sentry/core/protocol/SentryThread.java 70.37% <0.00%> (ø) 12.00% <0.00%> (?%)
.../main/java/io/sentry/core/SentryThreadFactory.java 90.90% <0.00%> (ø) 12.00% <0.00%> (?%)
...y-core/src/main/java/io/sentry/core/DateUtils.java 52.38% <0.00%> (ø) 4.00% <0.00%> (?%)
...-core/src/main/java/io/sentry/core/NoOpLogger.java 100.00% <0.00%> (ø) 5.00% <0.00%> (?%)
...c/main/java/io/sentry/core/protocol/Mechanism.java 37.93% <0.00%> (ø) 6.00% <0.00%> (?%)
.../src/main/java/io/sentry/core/SystemOutLogger.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
.../main/java/io/sentry/core/protocol/DebugImage.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
... and 79 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3052406...b16d9a5. Read the comment docs.

@marandaneto marandaneto merged commit c9a24d4 into master Apr 15, 2020
@marandaneto marandaneto deleted the fix/exited-session branch April 15, 2020 07:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants