File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -690,17 +690,24 @@ fn test_soft_purge() {
690
690
let key3 = write_key ( [ "keyB" ] , "value3" ) ;
691
691
692
692
fastly:: http:: purge:: soft_purge_surrogate_key ( "keyB" ) . unwrap ( ) ;
693
- // Allow either of two behaviors:
694
- // - Does not return stale results
695
- // - Returns stale results, but marks them stale
696
- if let Some ( found) = lookup ( key1) . execute ( ) . unwrap ( ) {
697
- assert ! ( found. is_stale( ) ) ;
698
- }
699
- if let Some ( found) = lookup ( key3) . execute ( ) . unwrap ( ) {
700
- assert ! ( found. is_stale( ) ) ;
701
- }
693
+ // Compute Platform will return stale data that has been soft-purged, if it's still within the
694
+ // TTL.
695
+ assert ! ( lookup( key1)
696
+ . execute( )
697
+ . unwrap( )
698
+ . expect( "is found" )
699
+ . is_stale( ) ) ;
700
+ assert ! ( lookup( key3)
701
+ . execute( )
702
+ . unwrap( )
703
+ . expect( "is found" )
704
+ . is_stale( ) ) ;
702
705
// key2 is untouched:
703
- assert ! ( !lookup( key2) . execute( ) . unwrap( ) . unwrap( ) . is_stale( ) ) ;
706
+ assert ! ( !lookup( key2)
707
+ . execute( )
708
+ . unwrap( )
709
+ . expect( "is found" )
710
+ . is_stale( ) ) ;
704
711
}
705
712
706
713
fn test_purge_variant ( ) {
You can’t perform that action at this time.
0 commit comments