@@ -443,20 +443,19 @@ mod tests {
443
443
444
444
// Create the symcache for the first time. Since the bcsymbolmap is not available, names in the
445
445
// symcache will be obfuscated.
446
- let owned_symcache = symcache_actor
446
+ let symcache = symcache_actor
447
447
. fetch ( fetch_symcache. clone ( ) )
448
448
. await
449
449
. cache
450
- . ok ( )
451
450
. unwrap ( ) ;
452
451
453
- let symcache = owned_symcache. get ( ) ;
454
- let sl = symcache. lookup ( 0x5a75 ) . next ( ) . unwrap ( ) ;
452
+ let sl = symcache. get ( ) . lookup ( 0x5a75 ) . next ( ) . unwrap ( ) ;
455
453
assert_eq ! (
456
454
sl. file( ) . unwrap( ) . full_path( ) ,
457
455
"__hidden#41_/__hidden#41_/__hidden#42_"
458
456
) ;
459
457
assert_eq ! ( sl. function( ) . name( ) , "__hidden#0_" ) ;
458
+ drop ( symcache) ;
460
459
461
460
// Copy the plist and bcsymbolmap to the temporary symbol directory so that the SymCacheActor can find them.
462
461
fs:: copy (
@@ -472,37 +471,30 @@ mod tests {
472
471
. unwrap ( ) ;
473
472
474
473
// Create the symcache for the second time. Even though the bcsymbolmap is now available, its absence should
475
- // still be cached and the SymcacheActor should make no attempt to download it. Therefore, the names should
474
+ // still be cached and the SymCacheActor should make no attempt to download it. Therefore, the names should
476
475
// be obfuscated like before.
477
- let owned_symcache = symcache_actor
476
+ let symcache = symcache_actor
478
477
. fetch ( fetch_symcache. clone ( ) )
479
478
. await
480
479
. cache
481
- . ok ( )
482
480
. unwrap ( ) ;
483
481
484
- let symcache = owned_symcache. get ( ) ;
485
- let sl = symcache. lookup ( 0x5a75 ) . next ( ) . unwrap ( ) ;
482
+ let sl = symcache. get ( ) . lookup ( 0x5a75 ) . next ( ) . unwrap ( ) ;
486
483
assert_eq ! (
487
484
sl. file( ) . unwrap( ) . full_path( ) ,
488
485
"__hidden#41_/__hidden#41_/__hidden#42_"
489
486
) ;
490
487
assert_eq ! ( sl. function( ) . name( ) , "__hidden#0_" ) ;
488
+ drop ( symcache) ;
491
489
492
490
// Sleep long enough for the negative cache entry to become invalid.
493
491
std:: thread:: sleep ( TIMEOUT ) ;
494
492
495
493
// Create the symcache for the third time. This time, the bcsymbolmap is downloaded and the names in the
496
494
// symcache are unobfuscated.
497
- let owned_symcache = symcache_actor
498
- . fetch ( fetch_symcache. clone ( ) )
499
- . await
500
- . cache
501
- . ok ( )
502
- . unwrap ( ) ;
495
+ let symcache = symcache_actor. fetch ( fetch_symcache) . await . cache . unwrap ( ) ;
503
496
504
- let symcache = owned_symcache. get ( ) ;
505
- let sl = symcache. lookup ( 0x5a75 ) . next ( ) . unwrap ( ) ;
497
+ let sl = symcache. get ( ) . lookup ( 0x5a75 ) . next ( ) . unwrap ( ) ;
506
498
assert_eq ! (
507
499
sl. file( ) . unwrap( ) . full_path( ) ,
508
500
"/Users/philipphofmann/git-repos/sentry-cocoa/Sources/Sentry/SentryMessage.m"
0 commit comments