Skip to content

Commit 1a4d630

Browse files
committed
Use suggestions by Gemini.
1 parent b9533d2 commit 1a4d630

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/docker-e2e/resiliency_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"context"
77
"fmt"
88
"io"
9+
"net"
910
"strings"
1011
"testing"
1112
"time"
@@ -57,7 +58,7 @@ func (s *DockerTestSuite) TestRollkitNodeRestart() {
5758
httpPortStr := rollkitNode.GetHostHTTPPort()
5859
s.Require().NotEmpty(httpPortStr, "HTTP port should not be empty")
5960

60-
httpPort := strings.Split(httpPortStr, ":")[len(strings.Split(httpPortStr, ":"))-1]
61+
_, httpPort, err := net.SplitHostPort(httpPortStr)
6162
client, err = NewClient("localhost", httpPort)
6263
s.Require().NoError(err)
6364
})

0 commit comments

Comments
 (0)