Skip to content

Commit c3f4b3f

Browse files
committed
set original times for Idempotency tests
1 parent c95d786 commit c3f4b3f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spec/Idempotency.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ describe('Idempotency', () => {
1111
/** Enable TTL expiration simulated by removing entry instead of waiting for MongoDB TTL monitor which
1212
runs only every 60s, so it can take up to 119s until entry removal - ain't nobody got time for that */
1313
const SIMULATE_TTL = true;
14-
const ttl = 2;
15-
const maxTimeOut = 4000;
14+
const ttl = 30;
15+
const maxTimeOut = 130000;
1616

1717
// Helpers
1818
async function deleteRequestEntry(reqId) {

src/Adapters/Storage/Mongo/MongoStorageAdapter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ export class MongoStorageAdapter implements StorageAdapter {
666666
mongoFieldNames.forEach(fieldName => {
667667
indexCreationRequest[fieldName] = options.indexType !== undefined ? options.indexType : 1;
668668
});
669+
669670
const defaultOptions: Object = { background: true, sparse: true };
670671
const indexNameOptions: Object = indexName ? { name: indexName } : {};
671672
const ttlOptions: Object = options.ttl !== undefined ? { expireAfterSeconds: options.ttl } : {};
@@ -678,6 +679,7 @@ export class MongoStorageAdapter implements StorageAdapter {
678679
...indexNameOptions,
679680
...ttlOptions,
680681
};
682+
681683
return this._adaptiveCollection(className)
682684
.then(
683685
collection =>

0 commit comments

Comments
 (0)