Skip to content

Commit d143ab7

Browse files
ampampcode-com
andcommitted
test(provider): cover lazy static-file cache refresh
Restore the static-file cache refresh regression test after rebasing so the branch still verifies that uncached updates stay lazy and cached readers see refreshed header data. Amp-Thread-ID: https://ampcode.com/threads/T-019df228-9b31-759c-9b1d-a426d6bb6808 Co-authored-by: Amp <[email protected]>
1 parent 3c66d50 commit d143ab7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • crates/storage/provider/src/providers/static_file

crates/storage/provider/src/providers/static_file/manager.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,8 @@ impl<N: NodePrimitives> StaticFileProvider<N> {
10701070
{
10711071
segment_header.clone()
10721072
} else {
1073-
let jar = NippyJar::<SegmentHeader>::load(&path).map_err(ProviderError::other)?;
1073+
let jar =
1074+
NippyJar::<SegmentHeader>::load(&path).map_err(ProviderError::other)?;
10741075
let header = jar.user_header().clone();
10751076
loaded_jar = Some(jar);
10761077
header
@@ -3146,6 +3147,7 @@ mod tests {
31463147
Ok(())
31473148
}
31483149

3150+
#[test]
31493151
fn test_update_index_only_refreshes_cached_jar() -> eyre::Result<()> {
31503152
let (static_dir, _) = create_test_static_files_dir();
31513153
let provider: StaticFileProvider<EthPrimitives> =

0 commit comments

Comments
 (0)