@@ -99,12 +99,12 @@ func TestListen(t *testing.T) {
99
99
}
100
100
}
101
101
102
- func AcceptHelper (numSockets int , options map [string ]string , t * testing.T ) {
102
+ func AcceptHelper (numSockets int , port uint16 , options map [string ]string , t * testing.T ) {
103
103
listening := make (chan struct {})
104
- listener := NewSrtSocket ("localhost" , 8090 , options )
104
+ listener := NewSrtSocket ("localhost" , port , options )
105
105
var connectors []* SrtSocket
106
106
for i := 0 ; i < numSockets ; i ++ {
107
- connectors = append (connectors , NewSrtSocket ("localhost" , 8090 , options ))
107
+ connectors = append (connectors , NewSrtSocket ("localhost" , port , options ))
108
108
}
109
109
wg := sync.WaitGroup {}
110
110
timer := time .AfterFunc (time .Second , func () {
@@ -155,7 +155,7 @@ func TestAcceptNonBlocking(t *testing.T) {
155
155
156
156
options := make (map [string ]string )
157
157
options ["transtype" ] = "file"
158
- AcceptHelper (1 , options , t )
158
+ AcceptHelper (1 , 8091 , options , t )
159
159
}
160
160
161
161
func TestAcceptBlocking (t * testing.T ) {
@@ -164,15 +164,15 @@ func TestAcceptBlocking(t *testing.T) {
164
164
options := make (map [string ]string )
165
165
options ["blocking" ] = "1"
166
166
options ["transtype" ] = "file"
167
- AcceptHelper (1 , options , t )
167
+ AcceptHelper (1 , 8092 , options , t )
168
168
}
169
169
170
170
func TestMultipleAcceptNonBlocking (t * testing.T ) {
171
171
InitSRT ()
172
172
173
173
options := make (map [string ]string )
174
174
options ["transtype" ] = "file"
175
- AcceptHelper (3 , options , t )
175
+ AcceptHelper (3 , 8093 , options , t )
176
176
}
177
177
178
178
func TestMultipleAcceptBlocking (t * testing.T ) {
@@ -181,7 +181,7 @@ func TestMultipleAcceptBlocking(t *testing.T) {
181
181
options := make (map [string ]string )
182
182
options ["blocking" ] = "1"
183
183
options ["transtype" ] = "file"
184
- AcceptHelper (3 , options , t )
184
+ AcceptHelper (3 , 8094 , options , t )
185
185
}
186
186
187
187
func TestSetSockOptInt (t * testing.T ) {
0 commit comments