Skip to content

Commit

Permalink
Open an close db test
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Jul 2, 2024
1 parent 1c93da7 commit 5db78e6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PODS:
- hermes-engine (0.74.0):
- hermes-engine/Pre-built (= 0.74.0)
- hermes-engine/Pre-built (0.74.0)
- op-sqlite (6.0.4):
- op-sqlite (6.1.1):
- React
- React-callinvoker
- React-Core
Expand Down Expand Up @@ -1358,7 +1358,7 @@ SPEC CHECKSUMS:
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: 6eae7edb2f563ee41d7c1f91f4f2e57c26d8a5c3
op-sqlite: d4e86e388f05494f1edc10a54a4b149687c52825
op-sqlite: 041488eede2da90042155ce4e8d0d714013662d9
RCT-Folly: 045d6ecaa59d826c5736dfba0b2f4083ff8d79df
RCTDeprecation: 3ca8b6c36bfb302e1895b72cfe7db0de0c92cd47
RCTRequired: 9fc183af555fd0c89a366c34c1ae70b7e03b1dc5
Expand Down Expand Up @@ -1412,4 +1412,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 0ab74fecad6ac2e35f8eab32fe5772c19d2015b2

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
"op-sqlite": {
"sqlcipher": false,
"crsqlite": false,
"performanceMode": "1",
"performanceMode": "2",
"iosSqlite": false,
"fts5": false,
"fts5": true,
"libsql": false
}
}
13 changes: 13 additions & 0 deletions example/src/tests/dbsetup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,18 @@ export function dbSetupTests() {
// expect(!!e).to.equal(true);
// }
// });

it('Creates new connections per query and closes them', async () => {
for (let i = 0; i < 100; i++) {
let db = open({
name: 'versionTest.sqlite',
encryptionKey: 'test',
});

db.execute('select 1;');

db.close();
}
});
});
}

0 comments on commit 5db78e6

Please sign in to comment.