Skip to content

Commit ebf67d3

Browse files
committed
properly clear cache testing
1 parent a6c692d commit ebf67d3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/ParseGraphQLSchema.spec.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('ParseGraphQLSchema', () => {
7070
const graphQLSubscriptions = parseGraphQLSchema.graphQLSubscriptions;
7171
const newClassObject = new Parse.Object('NewClass');
7272
await newClassObject.save();
73-
await databaseController.schemaCache.clear();
73+
await parseServer.config.schemaCache.clear();
7474
await new Promise(resolve => setTimeout(resolve, 200));
7575
await parseGraphQLSchema.load();
7676
expect(parseClasses).not.toBe(parseGraphQLSchema.parseClasses);
@@ -428,14 +428,14 @@ describe('ParseGraphQLSchema', () => {
428428
log: defaultLogger,
429429
appId,
430430
});
431-
await parseGraphQLSchema.databaseController.schemaCache.clear();
431+
await parseGraphQLSchema.schemaCache.clear();
432432
const schema1 = await parseGraphQLSchema.load();
433433
const types1 = parseGraphQLSchema.graphQLTypes;
434434
const queries1 = parseGraphQLSchema.graphQLQueries;
435435
const mutations1 = parseGraphQLSchema.graphQLMutations;
436436
const user = new Parse.Object('User');
437437
await user.save();
438-
await parseGraphQLSchema.databaseController.schemaCache.clear();
438+
await parseGraphQLSchema.schemaCache.clear();
439439
const schema2 = await parseGraphQLSchema.load();
440440
const types2 = parseGraphQLSchema.graphQLTypes;
441441
const queries2 = parseGraphQLSchema.graphQLQueries;
@@ -458,14 +458,14 @@ describe('ParseGraphQLSchema', () => {
458458
});
459459
const car1 = new Parse.Object('Car');
460460
await car1.save();
461-
await parseGraphQLSchema.databaseController.schemaCache.clear();
461+
await parseGraphQLSchema.schemaCache.clear();
462462
const schema1 = await parseGraphQLSchema.load();
463463
const types1 = parseGraphQLSchema.graphQLTypes;
464464
const queries1 = parseGraphQLSchema.graphQLQueries;
465465
const mutations1 = parseGraphQLSchema.graphQLMutations;
466466
const car2 = new Parse.Object('car');
467467
await car2.save();
468-
await parseGraphQLSchema.databaseController.schemaCache.clear();
468+
await parseGraphQLSchema.schemaCache.clear();
469469
const schema2 = await parseGraphQLSchema.load();
470470
const types2 = parseGraphQLSchema.graphQLTypes;
471471
const queries2 = parseGraphQLSchema.graphQLQueries;
@@ -488,13 +488,13 @@ describe('ParseGraphQLSchema', () => {
488488
});
489489
const car = new Parse.Object('Car');
490490
await car.save();
491-
await parseGraphQLSchema.databaseController.schemaCache.clear();
491+
await parseGraphQLSchema.schemaCache.clear();
492492
const schema1 = await parseGraphQLSchema.load();
493493
const queries1 = parseGraphQLSchema.graphQLQueries;
494494
const mutations1 = parseGraphQLSchema.graphQLMutations;
495495
const cars = new Parse.Object('cars');
496496
await cars.save();
497-
await parseGraphQLSchema.databaseController.schemaCache.clear();
497+
await parseGraphQLSchema.schemaCache.clear();
498498
const schema2 = await parseGraphQLSchema.load();
499499
const queries2 = parseGraphQLSchema.graphQLQueries;
500500
const mutations2 = parseGraphQLSchema.graphQLMutations;
@@ -534,7 +534,7 @@ describe('ParseGraphQLSchema', () => {
534534

535535
await data.save();
536536

537-
await parseGraphQLSchema.databaseController.schemaCache.clear();
537+
await parseGraphQLSchema.schemaCache.clear();
538538
await parseGraphQLSchema.load();
539539

540540
const queries1 = parseGraphQLSchema.graphQLQueries;
@@ -571,7 +571,7 @@ describe('ParseGraphQLSchema', () => {
571571

572572
await data.save();
573573

574-
await parseGraphQLSchema.databaseController.schemaCache.clear();
574+
await parseGraphQLSchema.schemaCache.clear();
575575
await parseGraphQLSchema.load();
576576

577577
const mutations = parseGraphQLSchema.graphQLMutations;

0 commit comments

Comments
 (0)