elasticsearch-transport 1.0.16.pre → 1.0.16.pre2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ed68a35342a6cb66f67c6bd8de44bbb21a4eea6
4
- data.tar.gz: 8e7cb53702e1103a44555a3d6364aec3c759b2b4
3
+ metadata.gz: 5ed8d1ac139a80ce2d895c36d50d8e046d0b07f4
4
+ data.tar.gz: d42f554630cce9427f2cfc6824cb2f4f67d3e229
5
5
  SHA512:
6
- metadata.gz: 4927b38e7a37068ed3893fd4441e052d6c49cb8f5bbeb346400a5dd5fb58e75a6a31a1b7aae368e580bf63f20624ff4fcb9ede1db950feaeef954eabdd3f0707
7
- data.tar.gz: fb1bd274b0d768529d453efa5b27194c61ff00b214c642818c9cb890ea2ca772772ec47e7cc04f8c5fc9a99222f8f25825d38b72bed1d91d8185d7aba5847f1e
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
- connection
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
- @connections.each {|c| c.dead! }
123
- @connections.all.each {|c| c.connection.close }
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.
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Transport
3
- VERSION = "1.0.16.pre"
3
+ VERSION = "1.0.16.pre2"
4
4
  end
5
5
  end
@@ -26,17 +26,10 @@ else
26
26
  assert_instance_of ::Manticore::Client, @transport.connections.first.connection
27
27
  end
28
28
 
29
- should "implement __close_connections" do
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 0, @transport.connections.size
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.pre
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-03-17 00:00:00.000000000 Z
11
+ date: 2016-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json