Skip to content

Commit 0a536dc

Browse files
use random ports to minimize address conflicts
1 parent 5186536 commit 0a536dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/inputs/tcp_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
it "should read plain with unicode" do
3535
event_count = 10
36-
port = 5511
36+
port = rand(1024..65535)
3737
conf = <<-CONFIG
3838
input {
3939
tcp {
@@ -61,7 +61,7 @@
6161
end
6262

6363
it "should read events with plain codec and ISO-8859-1 charset" do
64-
port = 5513
64+
port = rand(1024..65535)
6565
charset = "ISO-8859-1"
6666
conf = <<-CONFIG
6767
input {
@@ -89,7 +89,7 @@
8989
end
9090

9191
it "should read events with json codec" do
92-
port = 5514
92+
port = rand(1024..65535)
9393
conf = <<-CONFIG
9494
input {
9595
tcp {
@@ -124,7 +124,7 @@
124124
end
125125

126126
it "should read events with json codec (testing 'host' handling)" do
127-
port = 5517
127+
port = rand(1024..65535)
128128
conf = <<-CONFIG
129129
input {
130130
tcp {
@@ -151,7 +151,7 @@
151151
end
152152

153153
it "should read events with json_lines codec" do
154-
port = 5515
154+
port = rand(1024..65535)
155155
conf = <<-CONFIG
156156
input {
157157
tcp {
@@ -190,7 +190,7 @@
190190

191191
it "should one message per connection" do
192192
event_count = 10
193-
port = 5516
193+
port = rand(1024..65535)
194194
conf = <<-CONFIG
195195
input {
196196
tcp {

0 commit comments

Comments
 (0)