s3api: fix TestRoutedMultipartFinalize flake from a reused fake filer port (#12571)

* s3api: drop cached gRPC channels when a fake filer takes a port

A test that dials a dead owner leaves its failed channel in the
process-wide gRPC connection cache. When a later test's fake filer is
given the same port, its first RPC fails at once with the cached
connection refused, which is how TestRoutedMultipartFinalize failed on
the 32-bit job. The fake filer helpers now share fakeFilerAddress, which
invalidates any cached channel for the new address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: test a fake filer on a dead owner's reused port

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3api: drop cached channels for dead test filer addresses too

closedFilerAddress can be handed a port whose cached channel belonged to
a fake filer that just stopped and may still look ready; then the dead
owner's transaction is sent on it instead of failing over. Build its
address with fakeFilerAddress as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 authored and GitHub committed 2026-11-11 14:50:16 -08:00
1 parent 6c1eec8703
commit a0f95e16bc
3 files changed
+49 -8

No files matched your search

+1 -2
View File
@@ -3,7 +3,6 @@ package s3api
import (
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"net/http/httptest"
@@ -260,7 +259,7 @@ func startRecordingFiler(t *testing.T, f *recordingFiler) pb.ServerAddress {
filer_pb.RegisterSeaweedFilerServer(srv, f)
go srv.Serve(lis)
t.Cleanup(srv.Stop)
return pb.ServerAddress(fmt.Sprintf("127.0.0.1:1.%d", lis.Addr().(*net.TCPAddr).Port))
return fakeFilerAddress(lis)
}
// newS3TablesServeTestServer builds the production router over a gateway whose