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

SystemCapabilityManager should automatically subscribe to capability updates and not save AppServiceCapabilities with duplicate serviceIDs #567

Closed
renonick87 opened this issue Oct 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@renonick87
Copy link
Contributor

Bug Summary

The SystemCapabilityManager needs to align with the other mobile SDL libraries to automatically subscribe to SystemCapability updates from SDL Core. This ensures that the library will be notified of updates as they happen.
Additionally, if an update for an AppServiceCapability is received by the library with the same ServiceID as an existing capability and if the update doesn't include the ServiceUpdateReason.REMOVED, then it will result in duplicate AppServiceCapability objects being saved. The library should prevent this from happening. There are AppServiceCapability comparison methods that are missing from the library that would resolve this. The methods _updateAppServices and _matchesAppService would be added to the SystemCapabilityManager.

Reproduction Steps

  1. Run SystemCapabilityManager unit tests

Expected Behavior:
The tests for updating an existing AppServiceCapability with the same serviceID will remove the old capability and replace it with the new one.
The tests for handling capability subscriptions successfully subscribe to the required capabilities and can later verify that each capability is subscribed.
The tests mentioned above should pass.

Observed Behavior:
The tests mentioned above fail, AppServiceCapability objects with the same serviceID are allowed to coexist, and the capability updates are not automatically subscribed.

Which projects have you seen this bug on?

No response

JavaScript Version(s)

No response

sdl_javascript Version

1.7.0

Testing Environment(s)

Manticore v2.9.0

Relevant log output

No response

@renonick87 renonick87 added the bug Something isn't working label Oct 26, 2022
@renonick87
Copy link
Contributor Author

Resolved by #566

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant