@@ -35,7 +35,6 @@ func TestHelp(t *testing.T) {
35
35
}
36
36
37
37
func TestListeners (t * testing.T ) {
38
- t .Parallel ()
39
38
testTable := []struct {
40
39
listener string
41
40
listenProto string
@@ -48,7 +47,6 @@ func TestListeners(t *testing.T) {
48
47
listener := data .listener
49
48
listenProto := data .listenProto
50
49
t .Run (listener , func (t * testing.T ) {
51
- t .Parallel ()
52
50
receptorStdOut := bytes.Buffer {}
53
51
cmd := exec .Command ("receptor" , "--node" , "id=test" , listener , "port=0" )
54
52
cmd .Stdout = & receptorStdOut
@@ -76,7 +74,6 @@ func TestListeners(t *testing.T) {
76
74
}
77
75
78
76
func TestSSLListeners (t * testing.T ) {
79
- t .Parallel ()
80
77
testTable := []struct {
81
78
listener string
82
79
}{
@@ -86,8 +83,6 @@ func TestSSLListeners(t *testing.T) {
86
83
for _ , data := range testTable {
87
84
listener := data .listener
88
85
t .Run (listener , func (t * testing.T ) {
89
- t .Parallel ()
90
-
91
86
key , crt , err := utils .GenerateCert ("test" , "test" , []string {"test" }, []string {"test" })
92
87
if err != nil {
93
88
t .Fatal (err )
@@ -130,7 +125,6 @@ func TestSSLListeners(t *testing.T) {
130
125
}
131
126
132
127
func TestNegativeCost (t * testing.T ) {
133
- t .Parallel ()
134
128
testTable := []struct {
135
129
listener string
136
130
}{
@@ -141,7 +135,6 @@ func TestNegativeCost(t *testing.T) {
141
135
for _ , data := range testTable {
142
136
listener := data .listener
143
137
t .Run (listener , func (t * testing.T ) {
144
- t .Parallel ()
145
138
receptorStdOut := bytes.Buffer {}
146
139
cmd := exec .Command ("receptor" , "--node" , "id=test" , listener , "port=0" , "cost=-1" )
147
140
cmd .Stdout = & receptorStdOut
@@ -151,19 +144,18 @@ func TestNegativeCost(t *testing.T) {
151
144
}
152
145
153
146
// Wait for our process to hopefully run and quit
154
- time .Sleep (500 * time .Millisecond )
147
+ time .Sleep (1500 * time .Millisecond )
155
148
156
149
cmd .Process .Kill ()
157
150
cmd .Wait ()
158
151
if ! strings .Contains (receptorStdOut .String (), "Error: connection cost must be positive" ) {
159
- t .Fatalf ("Expected stdout: Error: connection cost must be positive, actual stdout: %s " , receptorStdOut .String ())
152
+ t .Fatalf ("Expected stdout: Error: connection cost must be positive, actual stdout: %v " , receptorStdOut .String ())
160
153
}
161
154
})
162
155
}
163
156
}
164
157
165
158
func TestCostMap (t * testing.T ) {
166
- t .Parallel ()
167
159
testTable := []struct {
168
160
listener string
169
161
listenProto string
@@ -179,11 +171,9 @@ func TestCostMap(t *testing.T) {
179
171
costMaps := make ([]string , len (data .costMaps ))
180
172
copy (costMaps , data .costMaps )
181
173
t .Run (listener , func (t * testing.T ) {
182
- t .Parallel ()
183
174
for _ , costMap := range costMaps {
184
175
costMapCopy := costMap
185
176
t .Run (costMapCopy , func (t * testing.T ) {
186
- t .Parallel ()
187
177
receptorStdOut := bytes.Buffer {}
188
178
cmd := exec .Command ("receptor" , "--node" , "id=test" , listener , "port=0" , fmt .Sprintf ("nodecost=%s" , costMapCopy ))
189
179
cmd .Stdout = & receptorStdOut
@@ -213,7 +203,6 @@ func TestCostMap(t *testing.T) {
213
203
}
214
204
215
205
func TestCosts (t * testing.T ) {
216
- t .Parallel ()
217
206
testTable := []struct {
218
207
listener string
219
208
listenProto string
@@ -229,7 +218,6 @@ func TestCosts(t *testing.T) {
229
218
costs := make ([]string , len (data .costs ))
230
219
copy (costs , data .costs )
231
220
t .Run (listener , func (t * testing.T ) {
232
- t .Parallel ()
233
221
for _ , cost := range costs {
234
222
costCopy := cost
235
223
t .Run (costCopy , func (t * testing.T ) {
0 commit comments