Updating object store (bug fix). Mildly rewrritten a test. (#1622)

This commit is contained in:
Kenneth Geisshirt 2018-01-17 12:15:20 +01:00 committed by GitHub
parent 4f8eae6fc2
commit 676eca6bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 8 deletions

View File

@ -1,3 +1,17 @@
X.Y.Z Release notes
=============================================================
### Breaking changes
* None.
### Enhancements
* None.
### Bug fixes
* [Object Server] Fixed a bug in upload progress reporting.
### Internal
* None.
2.2.2 Release notes (2018-1-16)
=============================================================
### Breaking changes

View File

@ -2,4 +2,4 @@ PACKAGE_NAME=realm-js
VERSION=2.2.2
REALM_CORE_VERSION=5.1.2
REALM_SYNC_VERSION=2.2.9
REALM_OBJECT_SERVER_VERSION=2.2.0
REALM_OBJECT_SERVER_VERSION=2.5.1

@ -1 +1 @@
Subproject commit 8517ee7f4378fe0f54945b3e4973766ff65e455d
Subproject commit 9aab0ffd5bc7bfc438ec28375ba581cf732f57ee

View File

@ -542,12 +542,17 @@ module.exports = {
schema: [{ name: 'Dog', properties: { name: 'string' } }],
};
const realm = new Realm(config);
return new Promise((resolve, reject) => {
realm.syncSession.addProgressNotification('download', 'reportIndefinitely', resolve);
setTimeout(function() {
reject("Progress Notifications API failed to call progress callback for Realm constructor");
}, 5000);
return Realm.open(config).then((realm) => {
return new Promise((resolve, reject) => {
realm.syncSession.addProgressNotification('download', 'reportIndefinitely', (x, y) => {
if (x === y) {
resolve();
}
});
setTimeout(function() {
reject("Progress Notifications API failed to call progress callback for Realm constructor");
}, 5000);
});
});
});
},