connection_pool 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +6 -0
- data/lib/connection_pool/timed_stack.rb +2 -1
- data/lib/connection_pool/version.rb +1 -1
- data/test/test_connection_pool_timed_stack.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec91685df50fe18b79ef2cd2ed2fb038e322ff81
|
4
|
+
data.tar.gz: 99b88e1aa01811e18c2737e8e062c4726ce54666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53d34f8ca6a7d51ce535a83e2821dd33eb15a623df3022b89775c232876c8fec28a2b33adda24248136014d99f0ebe9f09c1f49e1f0ced76435db26538e907a7
|
7
|
+
data.tar.gz: 660f22d0f828c789942da1da3d7c4131e008dd383a83c74e59ea03f306a59b966e879d42f9704ffa3b7de6accb6c114cfff982d3343bbe34c5e60ecc8f705ac5
|
data/Changes.md
CHANGED
@@ -34,6 +34,25 @@ class TestConnectionPoolTimedStack < Minitest::Test
|
|
34
34
|
assert_equal 1, stack.length
|
35
35
|
end
|
36
36
|
|
37
|
+
def test_object_creation_fails
|
38
|
+
stack = ConnectionPool::TimedStack.new(2) { raise 'failure' }
|
39
|
+
|
40
|
+
begin
|
41
|
+
stack.pop
|
42
|
+
rescue => error
|
43
|
+
assert_equal 'failure', error.message
|
44
|
+
end
|
45
|
+
|
46
|
+
begin
|
47
|
+
stack.pop
|
48
|
+
rescue => error
|
49
|
+
assert_equal 'failure', error.message
|
50
|
+
end
|
51
|
+
|
52
|
+
refute_empty stack
|
53
|
+
assert_equal 2, stack.length
|
54
|
+
end
|
55
|
+
|
37
56
|
def test_pop
|
38
57
|
object = Object.new
|
39
58
|
@stack.push object
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connection_pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|