tests: fix test_eviction_across_generations trying to evict temp files (#5579)

This test is listing files in a timeline and then evicting them: if the
test ran slowly this could encounter temp files for unfinished
downloads: fix by filtering these out in evict_all_layers.
This commit is contained in:
John Spray
2023-10-17 13:26:11 +01:00
committed by GitHub
parent 093f8c5f45
commit ea648cfbc6

View File

@@ -492,7 +492,7 @@ def evict_all_layers(env: NeonEnv, tenant_id: TenantId, timeline_id: TimelineId)
)
client = env.pageserver.http_client()
for layer in initial_local_layers:
if "ephemeral" in layer.name:
if "ephemeral" in layer.name or "temp" in layer.name:
continue
log.info(f"Evicting layer {tenant_id}/{timeline_id} {layer.name}")
client.evict_layer(tenant_id=tenant_id, timeline_id=timeline_id, layer_name=layer.name)