Skip to content

Commit cf18b2b

Browse files
committed
wip
1 parent 619c56a commit cf18b2b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

spec/Idempotency.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ describe('Idempotency', () => {
4545
});
4646
});
4747

48-
afterAll(() => {
49-
jasmine.DEFAULT_TIMEOUT_INTERVAL = process.env.PARSE_SERVER_TEST_TIMEOUT || 10000;
50-
});
51-
5248
// Tests
5349
it('should enforce idempotency for cloud code function', async () => {
5450
let counter = 0;

spec/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if (dns.setDefaultResultOrder) {
1111
}
1212

1313
// Sets up a Parse API server for testing.
14-
jasmine.DEFAULT_TIMEOUT_INTERVAL = process.env.PARSE_SERVER_TEST_TIMEOUT || 10000;
1514
jasmine.getEnv().addReporter(new CurrentSpecReporter());
1615
jasmine.getEnv().addReporter(new SpecReporter());
1716

@@ -196,6 +195,7 @@ beforeAll(async () => {
196195

197196
Parse.initialize('test', 'test', 'test');
198197
Parse.serverURL = 'http://localhost:' + port + '/1';
198+
jasmine.DEFAULT_TIMEOUT_INTERVAL = process.env.PARSE_SERVER_TEST_TIMEOUT || 10000;
199199
});
200200

201201
afterEach(function (done) {

src/ParseServerRESTController.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function ParseServerRESTController(applicationId, router) {
5353
if (data.transaction === true) {
5454
initialPromise = config.database.createTransactionalSession();
5555
}
56+
console.log('inital promise');
5657
return initialPromise.then(() => {
5758
const promises = data.requests.map(request => {
5859
return handleRequest(request.method, request.path, request.body, options, config).then(
@@ -71,8 +72,10 @@ function ParseServerRESTController(applicationId, router) {
7172
}
7273
);
7374
});
75+
console.log('promises', promises);
7476
return Promise.all(promises)
7577
.then(result => {
78+
console.log('result', result);
7679
if (data.transaction === true) {
7780
if (result.find(resultItem => typeof resultItem.error === 'object')) {
7881
return config.database.abortTransactionalSession().then(() => {

0 commit comments

Comments
 (0)