Skip to content

Commit c6d26da

Browse files
committed
More test case updates
1 parent f2993a9 commit c6d26da

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

Diff for: test/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ The test suite uses [mocha](https://www.npmjs.com/package/mocha),
9393
Set the following environment variables to provide credentials for the test suite.
9494

9595
* `NODE_ORACLEDB_USER` provides the username of the schema user which you used for testing.
96+
Use the username prefix 'NJS_' when creating a new user inside the test suite. Test suite does create such users.
9697

9798
* `NODE_ORACLEDB_PASSWORD` provides the password of the schema user which you used for testing.
99+
if you're generating a password for the user, use the predefined function testsUtil.generateRandomPassword.
98100

99101
* `NODE_ORACLEDB_CONNECTIONSTRING` provides the connection string that points to your database's location.
100102

@@ -242,6 +244,6 @@ dbaccess = (description=(RETRY_COUNT=20)(RETRY_DELAY=3)
242244

243245
### <a name="ORA-03114"></a> 5.4 ORA-03114: not connected to ORACLE
244246

245-
We firstly encoutered this error with `test/callTimeout.js`. It uses some hard-coded variables as assertion condition, which may lead to assertion fail in slow network situation.
247+
We first encoutered this error with `test/callTimeout.js`. It uses some hard-coded variables as assertion condition, which may lead to assertion fail in slow network situation.
246248

247249
The solution is commenting out this line `sqlnet.recv_timeout=<minutes>` from `sqlnet.ora` file.

Diff for: test/getStmtInfo.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ describe('162. getStmtInfo.js', function() {
294294
it('162.28 PL/SQL block bindname following newline character', async function() {
295295
const sql = `
296296
-- COMMENTS
297-
select :兆object_name_in as object_name,
297+
select :Öobject_name_in as object_name,
298298
'COMMENT' as object_type,
299299
:schema_name_in as schema_name
300300
from dual
@@ -306,26 +306,26 @@ describe('162. getStmtInfo.js', function() {
306306
owner
307307
from all_constraints
308308
where owner = :schema_name_in
309-
and table_name = :兆object_name_in
309+
and table_name = :Öobject_name_in
310310
and constraint_type = 'R'
311311
union all
312312
313313
-- RLS CONTEXTS
314-
select :兆object_name_in as object_name,
314+
select :Öobject_name_in as object_name,
315315
'RLS_CONTEXT' as object_type,
316316
:schema_name_in as schema_name
317317
from dual
318318
union all
319319
320320
-- RLS GROUP
321-
select :兆object_name_in as object_name,
321+
select :Öobject_name_in as object_name,
322322
'RLS_GROUP' as object_type,
323323
:schema_name_in as schema_name
324324
from dual
325325
union all
326326
327327
-- RLS POLICY
328-
select :兆object_name_in as object_name,
328+
select :Öobject_name_in as object_name,
329329
'RLS_POLICY' as object_type,
330330
:schema_name_in as schema_name
331331
from dual
@@ -337,7 +337,7 @@ describe('162. getStmtInfo.js', function() {
337337
owner
338338
from all_constraints
339339
where owner = :schema_name_in
340-
and table_name = :兆object_name_in
340+
and table_name = :Öobject_name_in
341341
and constraint_type != 'R'
342342
union all
343343
@@ -347,7 +347,7 @@ describe('162. getStmtInfo.js', function() {
347347
owner
348348
from all_indexes
349349
where table_owner = :schema_name_in
350-
and table_name = :兆object_name_in
350+
and table_name = :Öobject_name_in
351351
union all
352352
353353
-- TRIGGERS
@@ -356,18 +356,18 @@ describe('162. getStmtInfo.js', function() {
356356
owner
357357
from all_triggers
358358
where table_owner = :schema_name_in
359-
and table_name = :兆object_name_in
359+
and table_name = :Öobject_name_in
360360
and base_object_type = 'TABLE'
361361
union all
362362
363363
-- OBJECTS GRANTS AS GRANTOR
364-
select :兆object_name_in,
364+
select :Öobject_name_in,
365365
'OBJECT_GRANT_AS_GRANTOR',
366366
:schema_name_in
367367
from dual`;
368368
const connection = await oracledb.getConnection(dbConfig);
369369
const info = await connection.getStatementInfo(sql);
370-
assert.deepStrictEqual(info.bindNames, ['兆OBJECT_NAME_IN', 'SCHEMA_NAME_IN']);
370+
assert.deepStrictEqual(info.bindNames, ['ÖOBJECT_NAME_IN', 'SCHEMA_NAME_IN']);
371371
await connection.close();
372372
}); // 162.28
373373
});

0 commit comments

Comments
 (0)