@@ -87,7 +87,7 @@ func (s *RepeatedNetworkFlowTestSuite) SetupSuite() {
87
87
s .ServerPort , err = s .getPort ("nginx" )
88
88
s .Require ().NoError (err )
89
89
90
- serverAddress := fmt .Sprintf ("%s:%s " , s .ServerIP , s .ServerPort )
90
+ serverAddress := fmt .Sprintf ("%s:%d " , s .ServerIP , s .ServerPort )
91
91
92
92
numMetaIter := strconv .Itoa (s .NumMetaIter )
93
93
numIter := strconv .Itoa (s .NumIter )
@@ -131,8 +131,11 @@ func (s *RepeatedNetworkFlowTestSuite) TestRepeatedNetworkFlow() {
131
131
actualClientEndpoint := networkInfos [0 ].RemoteAddress
132
132
133
133
// From server perspective, network connection info only has local port and remote IP
134
- assert .Equal (s .T (), fmt .Sprintf (":%s" , s .ServerPort ), actualServerEndpoint )
135
- assert .Equal (s .T (), s .ClientIP , actualClientEndpoint )
134
+ expectedServerEndpoint := types .CreateNetworkAddress ("" , "" , s .ServerPort )
135
+ expectedClientEndpoint := types .CreateNetworkAddress (s .ClientIP , "" , 0 )
136
+
137
+ assert .True (s .T (), types .EqualNetworkAddress (expectedServerEndpoint , actualServerEndpoint ))
138
+ assert .True (s .T (), types .EqualNetworkAddress (expectedClientEndpoint , actualClientEndpoint ))
136
139
137
140
// client side checks
138
141
0 commit comments