qpid_proton 0.24.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/cproton/cproton.c +1874 -3724
- data/lib/core/connection.rb +2 -2
- data/tests/test_container.rb +10 -10
- metadata +2 -2
data/lib/core/connection.rb
CHANGED
@@ -113,8 +113,8 @@ module Qpid::Proton
|
|
113
113
|
# @option opts [Integer] :max_frame_size Limit the size of AMQP frames
|
114
114
|
#
|
115
115
|
# @option opts [Boolean] :sasl_enabled (false) Enable or disable SASL.
|
116
|
-
# @option opts [Boolean] :sasl_allow_insecure_mechs (false) Allow mechanisms send secrets in
|
117
|
-
# @option opts [String] :sasl_allowed_mechs SASL mechanisms allowed
|
116
|
+
# @option opts [Boolean] :sasl_allow_insecure_mechs (false) Allow mechanisms that send secrets in cleartext
|
117
|
+
# @option opts [String] :sasl_allowed_mechs Specify the SASL mechanisms allowed for this connection. The value is a space-separated list of mechanism names. The mechanisms allowed by default are determined by your SASL library and system configuration, with two exceptions: GSSAPI and GSS-SPNEGO are disabled by default. To enable them, you must explicitly add them using this option. Clients must set the allowed mechanisms before the the outgoing connection is attempted. Servers must set them before the listening connection is setup.
|
118
118
|
#
|
119
119
|
# @option opts [SSLDomain] :ssl_domain SSL configuration domain.
|
120
120
|
#
|
data/tests/test_container.rb
CHANGED
@@ -22,7 +22,7 @@ require 'socket'
|
|
22
22
|
|
23
23
|
# Since ruby 2.5 the default is true, turn it off since we have tests that deliberately
|
24
24
|
# leak exceptions from threads to very they are caught properly from Container#run()
|
25
|
-
Thread.report_on_exception = false rescue nil
|
25
|
+
(Thread.report_on_exception = false) rescue nil
|
26
26
|
|
27
27
|
# MessagingHandler that raises in on_error to catch unexpected errors
|
28
28
|
class ExceptionMessagingHandler
|
@@ -334,6 +334,11 @@ class ContainerTest < MiniTest::Test
|
|
334
334
|
assert_raises(Container::StoppedError) { cont.listen "" }
|
335
335
|
end
|
336
336
|
|
337
|
+
# Check if two time values are "close enough" to be reasonable.
|
338
|
+
def assert_equalish(x, y, delta=0.1)
|
339
|
+
assert_in_delta(x, y, delta)
|
340
|
+
end
|
341
|
+
|
337
342
|
# Test container doesn't stops only when schedule work is done
|
338
343
|
def test_container_work_queue
|
339
344
|
c = Container.new __method__
|
@@ -345,8 +350,8 @@ class ContainerTest < MiniTest::Test
|
|
345
350
|
delays.sort.each do |d|
|
346
351
|
x = a.shift
|
347
352
|
assert_equal d, x[0]
|
348
|
-
assert_in_delta start + d, x[1], 0.01
|
349
353
|
end
|
354
|
+
assert_equalish delays.sum, Time.now-start
|
350
355
|
end
|
351
356
|
|
352
357
|
# Test container work queue finishes due tasks on external stop, drops future tasks
|
@@ -384,11 +389,7 @@ class ContainerTest < MiniTest::Test
|
|
384
389
|
start = Time.now
|
385
390
|
c.run
|
386
391
|
assert_equal 3, a.size
|
387
|
-
delays.
|
388
|
-
x = a.shift
|
389
|
-
assert_in_delta start + d + sum, x, 0.01
|
390
|
-
sum + d
|
391
|
-
end
|
392
|
+
assert_equalish delays.sum, Time.now-start
|
392
393
|
end
|
393
394
|
|
394
395
|
# Schedule calls from handlers
|
@@ -447,11 +448,10 @@ class ContainerTest < MiniTest::Test
|
|
447
448
|
|
448
449
|
assert_equal [1, t], q.pop
|
449
450
|
assert_equal [2, t], q.pop
|
450
|
-
|
451
|
+
assert_equalish 0.0, Time.now-start
|
451
452
|
assert_equal [3, t], q.pop
|
452
|
-
assert_in_delta 0.02, Time.now - start, 0.01
|
453
453
|
assert_equal [4, t], q.pop
|
454
|
-
|
454
|
+
assert_equalish 0.02 + 0.04, Time.now-start
|
455
455
|
|
456
456
|
c.work_queue.add { c.close }
|
457
457
|
t.join
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qpid_proton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darryl L. Pierce
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
Proton is a high performance, lightweight messaging library. It can be used in
|