elasticsearch-transport 1.0.16.pre → 1.0.16.pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ed8d1ac139a80ce2d895c36d50d8e046d0b07f4
|
4
|
+
data.tar.gz: d42f554630cce9427f2cfc6824cb2f4f67d3e229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa8c9b62eafdbc8955a9eca420428a1fecd2235e3b8a58d837fafc8957e90272f69c7eb27a834656d4a79a6b9bef52cf11f25b1435dc2710b320abd900c6db21
|
7
|
+
data.tar.gz: c443d1e6ab4254cf8e7d805ee6f3809c21328bd8e15ba14024cdbe10b00b611b130e7ce90b71a66a92f8de77381791accd8fea3935983693ff6861c0a35eefe5
|
@@ -64,11 +64,9 @@ module Elasticsearch
|
|
64
64
|
def get_connection(options={})
|
65
65
|
resurrect_dead_connections! if Time.now > @last_request_at + @resurrect_after
|
66
66
|
|
67
|
-
connection = connections.get_connection(options)
|
68
67
|
@counter_mtx.synchronize { @counter += 1 }
|
69
|
-
|
70
68
|
reload_connections! if reload_connections && counter % reload_after == 0
|
71
|
-
|
69
|
+
connections.get_connection(options)
|
72
70
|
end
|
73
71
|
|
74
72
|
# Reloads and replaces the connection collection based on cluster information.
|
@@ -119,8 +119,8 @@ module Elasticsearch
|
|
119
119
|
# @return [Connections::Collection]
|
120
120
|
#
|
121
121
|
def __close_connections
|
122
|
-
|
123
|
-
|
122
|
+
# The Manticore adapter uses a single long-lived instance
|
123
|
+
# of Manticore::Client, so we don't close the connections.
|
124
124
|
end
|
125
125
|
|
126
126
|
# Returns an array of implementation specific connection errors.
|
@@ -26,17 +26,10 @@ else
|
|
26
26
|
assert_instance_of ::Manticore::Client, @transport.connections.first.connection
|
27
27
|
end
|
28
28
|
|
29
|
-
should "
|
29
|
+
should "not close connections in __close_connections" do
|
30
30
|
assert_equal 1, @transport.connections.size
|
31
31
|
@transport.__close_connections
|
32
|
-
assert_equal
|
33
|
-
end
|
34
|
-
|
35
|
-
should "prevent requests after __close_connections" do
|
36
|
-
@transport.__close_connections
|
37
|
-
assert_raises ::Manticore::ClientStoppedException do
|
38
|
-
@transport.perform_request 'GET', '/'
|
39
|
-
end
|
32
|
+
assert_equal 1, @transport.connections.size
|
40
33
|
end
|
41
34
|
|
42
35
|
should "perform the request" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.16.
|
4
|
+
version: 1.0.16.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|