Skip to content

Commit

Permalink
Create less load for TestActivatorChainHandlerWithFullDuplex (#14820)
Browse files Browse the repository at this point in the history
* less load

* limit cons
  • Loading branch information
skonto authored Jan 22, 2024
1 parent 4546f92 commit 4928853
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/activator/handler/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ func TestActivatorChainHandlerWithFullDuplex(t *testing.T) {
defer proxyServer.Close()

transport := http.DefaultTransport.(*http.Transport).Clone()
transport.MaxIdleConnsPerHost = 10
transport.MaxIdleConns = 100

// Turning on this will hide the issue
transport.DisableKeepAlives = false
Expand All @@ -222,7 +224,7 @@ func TestActivatorChainHandlerWithFullDuplex(t *testing.T) {
go func(i int) {
defer wg.Done()

for i := 0; i < 1000; i++ {
for i := 0; i < 100; i++ {
if err := send(c, proxyServer.URL, body, "test-host"); err != nil {
t.Errorf("error during request: %v", err)
}
Expand Down

0 comments on commit 4928853

Please sign in to comment.