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
fix(ios): start initial timer id from one #11734
Conversation
|
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.
CR passed.
@janvennemann Is it possible to add unit test for this? I think it can be achieved by appending the log message in a string and compare it after completion. |
@vijaysingh-axway I thought about that, but the issue is actually pretty hard to test with our test suite. This issue only occurs for the very first timer started after the app launched. However, we use timers all over the place so i don't even get a chance to test for this particular bug. |
JIRA: https://jira.appcelerator.org/browse/TIMOB-27898
Optional Description:
We use simple number values as timer identifiers, which used to start from
0
. This could cause unexpected behavior when checking for a timer id since it evaluates to a falsy value for the first timer. Always starting and incrementing the timer ids from1
solves the issue.