Skip to content

Commit 1cd9696

Browse files
committed
[misc] test race condition correction
1 parent 07d0183 commit 1cd9696

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/integration/pool.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -692,18 +692,18 @@ describe.concurrent('Pool', () => {
692692
}, 5000);
693693

694694
test('ensure commit', async function () {
695-
await shareConn.query('DROP TABLE IF EXISTS ensureCommit');
696-
await shareConn.query('CREATE TABLE ensureCommit(firstName varchar(32))');
697-
await shareConn.query("INSERT INTO ensureCommit values ('john')");
695+
await shareConn.query('DROP TABLE IF EXISTS ensureCommit2');
696+
await shareConn.query('CREATE TABLE ensureCommit2(firstName varchar(32))');
697+
await shareConn.query("INSERT INTO ensureCommit2 values ('john')");
698698

699699
const pool = createPool({ connectionLimit: 1 });
700700
const conn = await pool.getConnection();
701701
await conn.beginTransaction();
702702
try {
703-
await conn.query("UPDATE ensureCommit SET firstName='Tom'");
703+
await conn.query("UPDATE ensureCommit2 SET firstName='Tom'");
704704
await conn.commit();
705705
await conn.end();
706-
const res = await shareConn.query('SELECT * FROM ensureCommit');
706+
const res = await shareConn.query('SELECT * FROM ensureCommit2');
707707
assert.deepEqual(res, [{ firstName: 'Tom' }]);
708708
} finally {
709709
conn.rollback();

0 commit comments

Comments
 (0)