Skip to content

feat: Add installationId in LiveQuery connect #976

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

Conversation

mbfakourii
Copy link
Member

@mbfakourii mbfakourii commented Oct 30, 2023

Pull Request

Issue

Closes: #975

Approach

add installationId in LiveQuery connect.

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title feat: add installationId in LiveQuery connect feat: Add installationId in LiveQuery connect Oct 30, 2023
@parse-github-assistant
Copy link

Thanks for opening this pull request!

@mbfakourii mbfakourii requested a review from a team October 30, 2023 19:46
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (f757dad) 40.60% compared to head (f2d35bd) 44.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #976      +/-   ##
==========================================
+ Coverage   40.60%   44.12%   +3.51%     
==========================================
  Files          60       60              
  Lines        3401     3404       +3     
==========================================
+ Hits         1381     1502     +121     
+ Misses       2020     1902     -118     
Files Coverage Δ
...ackages/dart/lib/src/network/parse_live_query.dart 50.90% <71.42%> (+50.90%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Could you add a test?

@mbfakourii
Copy link
Member Author

Could you add a test?

These additional items are in a private function, it is also for socket operation and cannot be tested.

@mtrezza
Copy link
Member

mtrezza commented Nov 1, 2023

Not sure I understand; why do you think it cannot be tested?

@mbfakourii
Copy link
Member Author

Not sure I understand; why do you think it cannot be tested?

Changes in this function. This function is a private function. It cannot be accessed from outside.

@mtrezza
Copy link
Member

mtrezza commented Nov 1, 2023

Is it not possible to access a private function in tests? How are all the LiveQuery features then tested?

@mbfakourii
Copy link
Member Author

If it not possible to access a private function in tests? How are all the LiveQuery features then tested?

There are currently no tests for LiveQuery!

@mtrezza
Copy link
Member

mtrezza commented Nov 2, 2023

Interesting. It should be easily possible to test an internal method. Can't you just reference the internal method directly in the test file, mock channel, execute the method and check whether the connect message has the installationId set?

@mbfakourii
Copy link
Member Author

mbfakourii commented Nov 2, 2023

Interesting. It should be easily possible to test an internal method. Can't you just reference the internal method directly in the test file, mock channel, execute the method and check whether the connect message has the installationId set?

I did not test with mockito, I will try to implement

@mbfakourii
Copy link
Member Author

@mtrezza

Test added

@mtrezza
Copy link
Member

mtrezza commented Nov 11, 2023

Congrats for adding the first live query test!

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good! Waiting for CI to pass...

@mtrezza mtrezza merged commit c5f08f6 into parse-community:master Nov 11, 2023
@mbfakourii mbfakourii deleted the add_installationid_in_connect_live_query branch December 9, 2023 13:03
@maravilhosinga
Copy link

This should be optional since, it breaks live query when using lower versions of parse server.
Specially for who uses sashido.io

@mtrezza
Copy link
Member

mtrezza commented Jun 14, 2024

@maravilhosinga could you please open a new issue and provide more specifics about what's breaking?

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.

installationId in LiveQuery connect
3 participants