File tree Expand file tree Collapse file tree 2 files changed +6
-24
lines changed Expand file tree Collapse file tree 2 files changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ static bool njsSubscription_createMessageTable(napi_env env,
247247void njsSubscription_eventHandler (njsSubscription * subscr ,
248248 dpiSubscrMessage * incomingMessage )
249249{
250- if (subscr -> handle ) {
250+ if (subscr -> handle && subscr -> name ) {
251251 uv_mutex_lock (& subscr -> mutex );
252252 uv_barrier_init (& subscr -> barrier , 2 );
253253 subscr -> message = incomingMessage ;
@@ -415,7 +415,7 @@ bool njsSubscription_startNotifications(njsSubscription *subscr,
415415{
416416 uv_loop_t * loop ;
417417
418- if (subscr -> nameLength == 0 ) {
418+ if (! subscr -> name ) {
419419
420420 // keep the name on the subscription
421421 subscr -> name = baton -> name ;
Original file line number Diff line number Diff line change @@ -238,17 +238,10 @@ describe('185. runCQN.js', function() {
238238 }
239239 } ) ; // 185.3
240240
241- it . skip ( '185.4 Negative - provide invalid SQL in CQN option' , async ( ) => {
241+ it ( '185.4 Negative - provide invalid SQL in CQN option' , async ( ) => {
242242 try {
243243
244244 const TABLE = 'nodb_tab_cqn_4' ;
245- let sql =
246- `CREATE TABLE ${ TABLE } (
247- k NUMBER
248- )` ;
249- let plsql = testsUtil . sqlCreateTable ( TABLE , sql ) ;
250- await conn . execute ( plsql ) ;
251-
252245 const myCallback = async function ( message ) {
253246 console . log ( message ) ;
254247 } ;
@@ -262,20 +255,9 @@ describe('185. runCQN.js', function() {
262255 } ;
263256
264257 await conn . subscribe ( 'sub4' , options ) ;
265-
266- sql = `INSERT INTO ${ TABLE } VALUES (103)` ;
267- await conn . execute ( sql ) ;
268-
269- plsql = `BEGIN DBMS_SESSION.SLEEP(2); END;` ;
270- await conn . execute ( plsql ) ;
271- await conn . commit ( ) ;
272-
273- await conn . unsubscribe ( 'sub4' ) ;
274-
275- sql = `DROP TABLE ${ TABLE } PURGE` ;
276- await conn . execute ( sql ) ;
277258 } catch ( err ) {
278- should . not . exist ( err ) ;
259+ should . exist ( err ) ;
260+ ( err . message ) . should . startWith ( "DPI-1013:" ) ;
279261 }
280262 } ) ; // 185.4
281263
@@ -328,4 +310,4 @@ describe('185. runCQN.js', function() {
328310 should . not . exist ( err ) ;
329311 }
330312 } ) ; // 185.5
331- } ) ;
313+ } ) ;
You can’t perform that action at this time.
0 commit comments