Skip to content

Commit

Permalink
fix useless listen
Browse files Browse the repository at this point in the history
  • Loading branch information
castaneai committed Nov 22, 2024
1 parent 33a0bba commit 9cd2656
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ func NewTestFrontendServer(t *testing.T, store statestore.FrontendStore, addr st
// start frontend
mux := http.NewServeMux()
mux.Handle(openmatchconnect.NewFrontendServiceHandler(NewFrontendService(store, opts...)))
sv := httptest.NewUnstartedServer(h2c.NewHandler(mux, &http2.Server{}))
lis, err := newLocalListener(addr)
if err != nil {
t.Fatalf("failed to listen TCP addr: %+v", err)
}
sv.Listener = lis
sv.EnableHTTP2 = true
sv := &httptest.Server{
Listener: lis,
Config: &http.Server{Handler: h2c.NewHandler(mux, &http2.Server{})},
EnableHTTP2: true,
}
ts := &TestFrontendServer{
sv: sv,
}
Expand Down

0 comments on commit 9cd2656

Please sign in to comment.