Remove test delays (#5579)
* Changing __indexBuildCompletionCallbackForTests callback to serverStartComplete * Improving serverStartComplete callback to avoid production unhandled promise rejection * Add test to check inexistence of unhandled promise rejection on server fail * Removing some hooks delays * Removing delay after reconfigureServer * Improving code style
This commit is contained in:
committed by
GitHub
parent
2f161c25cd
commit
893f1d376e
@@ -453,13 +453,13 @@ describe('Cloud Code', () => {
|
||||
Parse.Cloud.afterSave('AfterSaveTest', function(req) {
|
||||
const obj = new Parse.Object('AfterSaveProof');
|
||||
obj.set('proof', req.object.id);
|
||||
obj.save();
|
||||
obj.save().then(test);
|
||||
});
|
||||
|
||||
const obj = new Parse.Object('AfterSaveTest');
|
||||
obj.save();
|
||||
|
||||
setTimeout(function() {
|
||||
function test() {
|
||||
const query = new Parse.Query('AfterSaveProof');
|
||||
query.equalTo('proof', obj.id);
|
||||
query.find().then(
|
||||
@@ -472,7 +472,7 @@ describe('Cloud Code', () => {
|
||||
done();
|
||||
}
|
||||
);
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
it('test afterSave ran on created object and returned a promise', function(done) {
|
||||
@@ -729,7 +729,7 @@ describe('Cloud Code', () => {
|
||||
Parse.Cloud.afterDelete('AfterDeleteTest', function(req) {
|
||||
const obj = new Parse.Object('AfterDeleteProof');
|
||||
obj.set('proof', req.object.id);
|
||||
obj.save();
|
||||
obj.save().then(test);
|
||||
});
|
||||
|
||||
const obj = new Parse.Object('AfterDeleteTest');
|
||||
@@ -737,7 +737,7 @@ describe('Cloud Code', () => {
|
||||
obj.destroy();
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
function test() {
|
||||
const query = new Parse.Query('AfterDeleteProof');
|
||||
query.equalTo('proof', obj.id);
|
||||
query.find().then(
|
||||
@@ -750,7 +750,7 @@ describe('Cloud Code', () => {
|
||||
done();
|
||||
}
|
||||
);
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
it('test cloud function return types', function(done) {
|
||||
|
||||
Reference in New Issue
Block a user