@@ -740,11 +740,13 @@ describe('272. jsonDualityView1.js', function() {
740740 describe ( '272.3.11 Create view without privilege ' , function ( ) {
741741 let connection = null ;
742742 let conn = null ;
743+ const user1 = dbConfig . createUser ( ) ;
744+ const user2 = dbConfig . createUser ( ) ;
743745 const pwd = testsUtil . generateRandomPassword ( ) ;
744- const createUser1 = `create user njs_test1 identified by ${ pwd } ` ;
745- const createUser2 = `create user njs_test2 identified by ${ pwd } ` ;
746- const grantPriv1 = `grant create session, resource, connect, unlimited tablespace to njs_test1 ` ;
747- const grantPriv2 = `grant create session to njs_test2 ` ;
746+ const createUser1 = `create user ${ user1 } identified by ${ pwd } ` ;
747+ const createUser2 = `create user ${ user2 } identified by ${ pwd } ` ;
748+ const grantPriv1 = `grant create session, resource, connect, unlimited tablespace to ${ user1 } ` ;
749+ const grantPriv2 = `grant create session to ${ user2 } ` ;
748750
749751 const createTableStudent = `create table student(
750752 stuid number,
@@ -774,8 +776,8 @@ describe('272. jsonDualityView1.js', function() {
774776 if ( dbConfig . test . drcp || dbConfig . test . isCmanTdm ) {
775777 return ;
776778 }
777- await connection . execute ( `drop user njs_test1 cascade` ) ;
778- await connection . execute ( `drop user njs_test2 cascade` ) ;
779+ await connection . execute ( `drop user ${ user1 } cascade` ) ;
780+ await connection . execute ( `drop user ${ user2 } cascade` ) ;
779781 await connection . close ( ) ;
780782 } ) ;
781783
@@ -785,7 +787,7 @@ describe('272. jsonDualityView1.js', function() {
785787 AS
786788 student @insert @update @delete
787789 {StudentId: stuid, StudentName: name}` ;
788- conn = await oracledb . getConnection ( { user : 'njs_test1' ,
790+ conn = await oracledb . getConnection ( { user : user1 ,
789791 password : pwd ,
790792 connectString : dbConfig . connectString
791793 } ) ;
@@ -807,13 +809,13 @@ describe('272. jsonDualityView1.js', function() {
807809
808810 it ( '272.3.11.2 Query with test2 user' , async function ( ) {
809811
810- conn = await oracledb . getConnection ( { user : 'njs_test2' ,
812+ conn = await oracledb . getConnection ( { user : user2 ,
811813 password : pwd ,
812814 connectString : dbConfig . connectString
813815 } ) ;
814816
815817 await assert . rejects (
816- async ( ) => await conn . execute ( `select * from njs_test1 .student_ov` ) ,
818+ async ( ) => await conn . execute ( `select * from ${ user1 } .student_ov` ) ,
817819 / O R A - 0 0 9 4 2 : / //ORA-00942: table or view does not exist
818820 ) ;
819821 await conn . close ( ) ;
0 commit comments