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

RDART-973: Add support for the new progress notifications #1546

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nirinchev
Copy link
Member

@nirinchev nirinchev commented Mar 8, 2024

Fixes #1564

TODO:

  • Changelog

* main: (28 commits)
  Wrong test for local development (#1591)
  Add vNext Changelog header (#1589)
  [Release 2.0.0-beta.2] (#1588)
  Update melos to 5.2.0 (#1587)
  RDART-977: Hierarchical logger (#1574)
  Fix release workflow (#1582)
  RDART-978: Add support RealmValue.fromJson (#1581)
  Fix oversight in install command
  Add vNext Changelog header (#1579)
  [Release 2.0.0-beta.1] (#1577)
  RDART-976: Fix install command (#1576)
  Update build instructions and switching Flutter/Dart versions (#1571)
  gitignore release folder
  Remove incorrectly committed files
  Cleanup changelog, bring back melos publishing (#1573)
  Add vNext Changelog header (#1572)
  [Release 2.0.0-alpha.5] (#1570)
  Revert "Copy symlinks for realm_dart"
  Copy symlinks for realm_dart
  Fix changelog
  ...

# Conflicts:
#	packages/realm_dart/lib/src/session.dart
#	packages/realm_dart/src/realm-core
#	packages/realm_dart/test/realm_test.dart
#	packages/realm_dart/test/session_test.dart
#	packages/realm_dart/test/test.dart
* main:
  Add vNext Changelog header (#1594)
  [Release 2.0.0] (#1593)
  Cleanup the changelog for 2.0.0 (#1592)
@nirinchev nirinchev requested a review from nielsenko April 9, 2024 12:55
@nirinchev nirinchev marked this pull request as ready for review April 9, 2024 12:55
@nirinchev nirinchev changed the title Add support for the new progress notifications RDART-973: Add support for the new progress notifications Apr 9, 2024
Copy link
Contributor

@nielsenko nielsenko left a comment

Choose a reason for hiding this comment

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

LGTM.

Perhaps you could elaborate a bit on the explanation of the test?

Comment on lines +217 to +230
// We should not see more updates in either direction
final uploadCallbacks = uploadData.callbacksInvoked;
final downloadCallbacks = downloadData.callbacksInvoked;

uploadRealm.write(() {
uploadRealm.add(NullableTypes(ObjectId(), differentiator, stringProp: generateRandomString(50)));
});

await uploadRealm.syncSession.waitForUpload();
await downloadRealm.syncSession.waitForDownload();

expect(uploadRealm.all<NullableTypes>().length, downloadRealm.all<NullableTypes>().length);
expect(uploadData.callbacksInvoked, uploadCallbacks);
expect(downloadData.callbacksInvoked, downloadCallbacks);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you elaborate the explanation of this part a bit? Why will we not see more upload callbacks here, when we add and wait for upload?

@@ -418,7 +418,7 @@ void setupTests() {

Realm.logger.setLogLevel(LogLevel.detail);
Realm.logger.onRecord.listen((record) {
testing.printOnFailure('${record.category} ${record.level.name}: ${record.message}');
testing.printOnFailure('${DateTime.now().toUtc()} ${record.category} ${record.level.name}: ${record.message}');
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@nielsenko
Copy link
Contributor

Some test failures needs to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the new sync progress estimates
2 participants