@@ -16,13 +16,13 @@ class Fluent::Plugin::OtlpOutputTest < Test::Unit::TestCase
16
16
def config
17
17
<<~CONFIG
18
18
<http>
19
- endpoint "http://127.0.0.1:14318 "
19
+ endpoint "http://127.0.0.1:24318 "
20
20
</http>
21
21
CONFIG
22
22
end
23
23
24
24
def server_config
25
- config = { BindAddress : "127.0.0.1" , Port : "14318 " }
25
+ config = { BindAddress : "127.0.0.1" , Port : "24318 " }
26
26
# Suppress webrick logs
27
27
config [ :Logger ] = DEFAULT_LOGGER
28
28
config [ :AccessLog ] = [ ]
@@ -71,8 +71,8 @@ def setup
71
71
end
72
72
73
73
def teardown
74
- @@server_request = nil
75
- @@server_response_code = 200
74
+ p "!" * 80
75
+ p @@http_server_thread
76
76
@@http_server_thread . kill
77
77
@@http_server_thread = nil
78
78
end
@@ -83,7 +83,7 @@ def create_driver(conf = config)
83
83
84
84
def test_configure
85
85
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
87
87
end
88
88
89
89
def test_send_logs
@@ -133,7 +133,7 @@ def test_send_compressed_message
133
133
134
134
d = create_driver ( %[
135
135
<http>
136
- endpoint "http://127.0.0.1:14318 "
136
+ endpoint "http://127.0.0.1:24318 "
137
137
compress gzip
138
138
</http>
139
139
] )
@@ -157,7 +157,7 @@ def test_unrecoverable_error
157
157
d . feed ( event )
158
158
end
159
159
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} ,
161
161
d . instance . log . out . logs . join )
162
162
163
163
d . instance_shutdown
@@ -169,15 +169,15 @@ def test_error_with_disabled_unrecoverable
169
169
170
170
d = create_driver ( %[
171
171
<http>
172
- endpoint "http://127.0.0.1:14318 "
172
+ endpoint "http://127.0.0.1:24318 "
173
173
error_response_as_unrecoverable false
174
174
</http>
175
175
] )
176
176
d . run ( default_tag : "otlp.test" , shutdown : false ) do
177
177
d . feed ( event )
178
178
end
179
179
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} ,
181
181
d . instance . log . out . logs . join )
182
182
183
183
d . instance_shutdown
@@ -192,7 +192,7 @@ def test_write_with_retryable_response
192
192
193
193
d = create_driver ( %[
194
194
<http>
195
- endpoint "http://127.0.0.1:14318 "
195
+ endpoint "http://127.0.0.1:24318 "
196
196
retryable_response_codes [503]
197
197
</http>
198
198
] )
@@ -211,7 +211,7 @@ def test_write_with_retryable_response
211
211
sub_test_case "HTTPS" do
212
212
def server_config
213
213
config = super
214
- config [ :Port ] = "14318 "
214
+ config [ :Port ] = "24318 "
215
215
# WEBrick supports self-generated self-signed certificate
216
216
config [ :SSLEnable ] = true
217
217
config [ :SSLCertName ] = [ [ "CN" , WEBrick ::Utils . getservername ] ]
@@ -221,7 +221,7 @@ def server_config
221
221
def config
222
222
<<~"CONFIG"
223
223
<http>
224
- endpoint "https://127.0.0.1:14318 "
224
+ endpoint "https://127.0.0.1:24318 "
225
225
</http>
226
226
<transport tls>
227
227
cert_path "#{ File . expand_path ( File . dirname ( __FILE__ ) + '/../resources/certs/ca.crt' ) } "
0 commit comments