@@ -392,9 +392,10 @@ if (semver.gte(pkgVersion, '7.7.0')) {
392392
393393 const err = data . errors
394394 . filter ( ( e ) => e . exception . type === 'RequestAbortedError' ) [ 0 ]
395- if ( semver . eq ( esVersion , '7.14.0' ) ) {
396- // https://github.com/elastic/elasticsearch-js/issues/1517
397- t . ok ( ! err , 'no APM error reported for abort because elastic/elasticsearch-js#1517' )
395+ if ( semver . satisfies ( esVersion , '7.14.x' ) ) {
396+ // https://github.com/elastic/elasticsearch-js/issues/1517 was fixed
397+ // for 7.15 and later.
398+ t . ok ( ! err , 'no APM error reported for abort with v7.14.x of the client because elastic/elasticsearch-js#1517' )
398399 } else {
399400 t . ok ( err , 'sent an error to APM server' )
400401 t . ok ( err . id , 'err.id' )
@@ -451,9 +452,10 @@ if (semver.gte(pkgVersion, '7.7.0')) {
451452
452453 const err = data . errors
453454 . filter ( ( e ) => e . exception . type === 'RequestAbortedError' ) [ 0 ]
454- if ( semver . eq ( esVersion , '7.14.0' ) ) {
455- // https://github.com/elastic/elasticsearch-js/issues/1517
456- t . ok ( ! err , 'no APM error reported for abort because elastic/elasticsearch-js#1517' )
455+ if ( semver . satisfies ( esVersion , '7.14.x' ) ) {
456+ // https://github.com/elastic/elasticsearch-js/issues/1517 was fixed
457+ // for 7.15 and later.
458+ t . ok ( ! err , 'no APM error reported for abort with v7.14.x of the client because elastic/elasticsearch-js#1517' )
457459 } else {
458460 t . ok ( err , 'sent an error to APM server' )
459461 t . ok ( err . id , 'err.id' )
0 commit comments