|
1244 | 1244 | context 'when using the Net::HTTP adapter' do |
1245 | 1245 |
|
1246 | 1246 | let!(:client) do |
1247 | | - described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :net_http) |
| 1247 | + #described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :net_http) |
| 1248 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :net_http) |
1248 | 1249 | end |
1249 | 1250 |
|
1250 | 1251 | it 'sets the options on the transport' do |
|
1255 | 1256 | context 'when using the HTTPClient adapter' do |
1256 | 1257 |
|
1257 | 1258 | let!(:client) do |
1258 | | - described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :httpclient) |
| 1259 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :httpclient) |
1259 | 1260 | end |
1260 | 1261 |
|
1261 | 1262 | it 'sets the options on the transport' do |
|
1266 | 1267 | context 'when using the Patron adapter' do |
1267 | 1268 |
|
1268 | 1269 | let!(:client) do |
1269 | | - described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :patron) |
| 1270 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :patron) |
1270 | 1271 | end |
1271 | 1272 |
|
1272 | 1273 | it 'sets the options on the transport' do |
|
1277 | 1278 | context 'when using the Net::HTTP::Persistent adapter' do |
1278 | 1279 |
|
1279 | 1280 | let!(:client) do |
1280 | | - described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :net_http_persistent) |
| 1281 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :net_http_persistent) |
1281 | 1282 | end |
1282 | 1283 |
|
1283 | 1284 | it 'sets the options on the transport' do |
|
1288 | 1289 | context 'when using the Typhoeus adapter' do |
1289 | 1290 |
|
1290 | 1291 | let!(:client) do |
1291 | | - described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :typhoeus) |
| 1292 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :typhoeus) |
1292 | 1293 | end |
1293 | 1294 |
|
1294 | 1295 | it 'sets the options on the transport' do |
|
1307 | 1308 | client.perform_request('DELETE', 'myindex') rescue |
1308 | 1309 | client.perform_request('PUT', 'myindex', {}, { settings: { number_of_shards: 2, number_of_replicas: 0 } }) |
1309 | 1310 | client.perform_request('PUT', 'myindex/mydoc/1', { routing: 'XYZ', timeout: '1s' }, { foo: 'bar' }) |
1310 | | - client.perform_request('GET', '_cluster/health?wait_for_status=green', {}) |
| 1311 | + client.perform_request('GET', '_cluster/health?wait_for_status=green&timeout=2s', {}) |
1311 | 1312 | end |
1312 | 1313 |
|
1313 | 1314 | let(:response) do |
|
0 commit comments