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,
247
247
void njsSubscription_eventHandler (njsSubscription * subscr ,
248
248
dpiSubscrMessage * incomingMessage )
249
249
{
250
- if (subscr -> handle ) {
250
+ if (subscr -> handle && subscr -> name ) {
251
251
uv_mutex_lock (& subscr -> mutex );
252
252
uv_barrier_init (& subscr -> barrier , 2 );
253
253
subscr -> message = incomingMessage ;
@@ -415,7 +415,7 @@ bool njsSubscription_startNotifications(njsSubscription *subscr,
415
415
{
416
416
uv_loop_t * loop ;
417
417
418
- if (subscr -> nameLength == 0 ) {
418
+ if (! subscr -> name ) {
419
419
420
420
// keep the name on the subscription
421
421
subscr -> name = baton -> name ;
Original file line number Diff line number Diff line change @@ -238,17 +238,10 @@ describe('185. runCQN.js', function() {
238
238
}
239
239
} ) ; // 185.3
240
240
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 ( ) => {
242
242
try {
243
243
244
244
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
-
252
245
const myCallback = async function ( message ) {
253
246
console . log ( message ) ;
254
247
} ;
@@ -262,20 +255,9 @@ describe('185. runCQN.js', function() {
262
255
} ;
263
256
264
257
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 ) ;
277
258
} catch ( err ) {
278
- should . not . exist ( err ) ;
259
+ should . exist ( err ) ;
260
+ ( err . message ) . should . startWith ( "DPI-1013:" ) ;
279
261
}
280
262
} ) ; // 185.4
281
263
@@ -328,4 +310,4 @@ describe('185. runCQN.js', function() {
328
310
should . not . exist ( err ) ;
329
311
}
330
312
} ) ; // 185.5
331
- } ) ;
313
+ } ) ;
You can’t perform that action at this time.
0 commit comments