@@ -184,38 +184,6 @@ describe('DataloaderInstrumentation', () => {
184184 assert . strictEqual ( batchSpan . name , 'dataloader.batch test-name' ) ;
185185 }
186186 } ) ;
187-
188- it ( 'correctly sets cache.key, cache.hit and cache.item_size attributes when data is available' , async ( ) => {
189- assert . strictEqual ( await dataloader . load ( 'test' ) , getMd5HashFromIdx ( 0 ) ) ;
190-
191- // We should have exactly two spans (one for .load and one for the batch)
192- assert . strictEqual ( memoryExporter . getFinishedSpans ( ) . length , 2 ) ;
193- const [ _batchSpan , loadSpan ] = memoryExporter . getFinishedSpans ( ) ;
194-
195- assert . deepStrictEqual ( loadSpan . attributes , {
196- 'cache.key' : [ 'test' ] ,
197- 'cache.hit' : true ,
198- 'cache.item_size' : 34 ,
199- } ) ;
200- } ) ;
201-
202- it ( 'correctly sets cache.key, cache.hit and cache.item_size attributes when data is not available' , async ( ) => {
203- const namedDataloader = new Dataloader ( async keys => {
204- return keys . map ( ( ) => undefined ) ;
205- } ) ;
206-
207- assert . strictEqual ( await namedDataloader . load ( 'unavailable' ) , undefined ) ;
208-
209- // We should have exactly two spans (one for .load and one for the batch)
210- assert . strictEqual ( memoryExporter . getFinishedSpans ( ) . length , 2 ) ;
211- const [ _batchSpan , loadSpan ] = memoryExporter . getFinishedSpans ( ) ;
212-
213- assert . deepStrictEqual ( loadSpan . attributes , {
214- 'cache.key' : [ 'unavailable' ] ,
215- 'cache.hit' : false ,
216- 'cache.item_size' : 0 ,
217- } ) ;
218- } ) ;
219187 } ) ;
220188
221189 describe ( 'loadMany' , ( ) => {
@@ -429,18 +397,6 @@ describe('DataloaderInstrumentation', () => {
429397 assert . strictEqual ( clearSpan . name , 'dataloader.clear test-name' ) ;
430398 }
431399 } ) ;
432-
433- it ( 'correctly sets attributes for clearing' , async ( ) => {
434- dataloader . clear ( 'test' ) ;
435-
436- // We should have exactly one span
437- assert . strictEqual ( memoryExporter . getFinishedSpans ( ) . length , 1 ) ;
438- const [ clearSpan ] = memoryExporter . getFinishedSpans ( ) ;
439-
440- assert . deepStrictEqual ( clearSpan . attributes , {
441- 'cache.key' : [ 'test' ] ,
442- } ) ;
443- } ) ;
444400 } ) ;
445401
446402 describe ( 'clearAll' , ( ) => {
@@ -593,19 +549,6 @@ describe('DataloaderInstrumentation', () => {
593549 assert . strictEqual ( primeSpan1 . name , 'dataloader.prime' ) ;
594550 assert . strictEqual ( primeSpan2 . name , 'dataloader.prime' ) ;
595551 } ) ;
596-
597- it ( 'correctly creates attributes for priming' , async ( ) => {
598- dataloader . prime ( 'test' , '1' ) ;
599-
600- // We should have exactly one span
601- assert . strictEqual ( memoryExporter . getFinishedSpans ( ) . length , 1 ) ;
602- const [ primeSpan ] = memoryExporter . getFinishedSpans ( ) ;
603-
604- assert . deepStrictEqual ( primeSpan . attributes , {
605- 'cache.key' : [ 'test' ] ,
606- 'cache.item_size' : 3 ,
607- } ) ;
608- } ) ;
609552 } ) ;
610553
611554 it ( 'should not create anything if disabled' , async ( ) => {
0 commit comments