Skip to content

Commit ad97595

Browse files
committed
log error to findout
1 parent d6aa432 commit ad97595

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

plugin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ function executionScope (pool, fn, cb) {
1919
}
2020

2121
conn.commit(function (err) {
22+
release(conn)
23+
2224
if (err) {
23-
release(conn)
2425
return cb(err)
2526
}
26-
release(conn)
27+
2728
return cb(null, res)
2829
})
2930
}

test/lib.test.js renamed to test/plugin.test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const Fastify = require('fastify')
66
const oracledb = require('oracledb')
77

88
const poolOptions = {
9-
user: 'travis',
10-
password: 'travis',
11-
connectString: 'localhost/xe'
9+
user: 'RANINFO',
10+
password: 'RANINFO',
11+
connectString: 'TTGDB12C-RANINFO_INTERNAL_DEV'
1212
}
1313

1414
test('creates pool from config', (t) => {
@@ -133,6 +133,7 @@ test('execution scope with promise', (t) => {
133133
t.strictDeepEqual(res.rows, [ { DUMMY: 'X' } ])
134134

135135
fastify.close(err => {
136+
console.log(fastify.oracle.pool.status)
136137
t.error(err)
137138
t.is(fastify.oracle.pool.status, fastify.oracle.db.POOL_STATUS_CLOSED)
138139
})

0 commit comments

Comments
 (0)