Skip to content

Commit 71a2cfc

Browse files
committed
port number
1 parent 57f89ce commit 71a2cfc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

test/fluent/plugin/test_out_otlp.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ class Fluent::Plugin::OtlpOutputTest < Test::Unit::TestCase
1616
def config
1717
<<~CONFIG
1818
<http>
19-
endpoint "http://127.0.0.1:14318"
19+
endpoint "http://127.0.0.1:24318"
2020
</http>
2121
CONFIG
2222
end
2323

2424
def server_config
25-
config = { BindAddress: "127.0.0.1", Port: "14318" }
25+
config = { BindAddress: "127.0.0.1", Port: "24318" }
2626
# Suppress webrick logs
2727
config[:Logger] = DEFAULT_LOGGER
2828
config[:AccessLog] = []
@@ -71,8 +71,8 @@ def setup
7171
end
7272

7373
def teardown
74-
@@server_request = nil
75-
@@server_response_code = 200
74+
p "!" * 80
75+
p @@http_server_thread
7676
@@http_server_thread.kill
7777
@@http_server_thread = nil
7878
end
@@ -83,7 +83,7 @@ def create_driver(conf = config)
8383

8484
def test_configure
8585
d = create_driver
86-
assert_equal "http://127.0.0.1:14318", d.instance.http_config.endpoint
86+
assert_equal "http://127.0.0.1:24318", d.instance.http_config.endpoint
8787
end
8888

8989
def test_send_logs
@@ -133,7 +133,7 @@ def test_send_compressed_message
133133

134134
d = create_driver(%[
135135
<http>
136-
endpoint "http://127.0.0.1:14318"
136+
endpoint "http://127.0.0.1:24318"
137137
compress gzip
138138
</http>
139139
])
@@ -157,7 +157,7 @@ def test_unrecoverable_error
157157
d.feed(event)
158158
end
159159

160-
assert_match(%r{got unrecoverable error response from 'http://127.0.0.1:14318/v1/logs', response code is 500},
160+
assert_match(%r{got unrecoverable error response from 'http://127.0.0.1:24318/v1/logs', response code is 500},
161161
d.instance.log.out.logs.join)
162162

163163
d.instance_shutdown
@@ -169,15 +169,15 @@ def test_error_with_disabled_unrecoverable
169169

170170
d = create_driver(%[
171171
<http>
172-
endpoint "http://127.0.0.1:14318"
172+
endpoint "http://127.0.0.1:24318"
173173
error_response_as_unrecoverable false
174174
</http>
175175
])
176176
d.run(default_tag: "otlp.test", shutdown: false) do
177177
d.feed(event)
178178
end
179179

180-
assert_match(%r{got error response from 'http://127.0.0.1:14318/v1/logs', response code is 500},
180+
assert_match(%r{got error response from 'http://127.0.0.1:24318/v1/logs', response code is 500},
181181
d.instance.log.out.logs.join)
182182

183183
d.instance_shutdown
@@ -192,7 +192,7 @@ def test_write_with_retryable_response
192192

193193
d = create_driver(%[
194194
<http>
195-
endpoint "http://127.0.0.1:14318"
195+
endpoint "http://127.0.0.1:24318"
196196
retryable_response_codes [503]
197197
</http>
198198
])
@@ -211,7 +211,7 @@ def test_write_with_retryable_response
211211
sub_test_case "HTTPS" do
212212
def server_config
213213
config = super
214-
config[:Port] = "14318"
214+
config[:Port] = "24318"
215215
# WEBrick supports self-generated self-signed certificate
216216
config[:SSLEnable] = true
217217
config[:SSLCertName] = [["CN", WEBrick::Utils.getservername]]
@@ -221,7 +221,7 @@ def server_config
221221
def config
222222
<<~"CONFIG"
223223
<http>
224-
endpoint "https://127.0.0.1:14318"
224+
endpoint "https://127.0.0.1:24318"
225225
</http>
226226
<transport tls>
227227
cert_path "#{File.expand_path(File.dirname(__FILE__) + '/../resources/certs/ca.crt')}"

0 commit comments

Comments
 (0)