|
630 | 630 | end |
631 | 631 |
|
632 | 632 | let(:port) do |
633 | | - (ENV['TEST_CLUSTER_PORT'] || 9250).to_i |
| 633 | + TEST_PORT |
634 | 634 | end |
635 | 635 |
|
636 | 636 | let(:transport_options) do |
|
652 | 652 | end |
653 | 653 |
|
654 | 654 | it 'connects to the cluster' do |
655 | | - expect(response.body['number_of_nodes']).to be > (1) |
| 655 | + expect(response.body['number_of_nodes']).to be >= (1) |
656 | 656 | end |
657 | 657 | end |
658 | 658 |
|
|
781 | 781 | it 'reloads the connections' do |
782 | 782 | expect(client.transport.connections.size).to eq(3) |
783 | 783 | expect(responses.all? { true }).to be(true) |
784 | | - expect(client.transport.connections.size).to eq(2) |
| 784 | + expect(client.transport.connections.size).to be >= (1) |
785 | 785 | end |
786 | 786 | end |
787 | 787 |
|
|
792 | 792 | end |
793 | 793 |
|
794 | 794 | let(:logger) do |
795 | | - double('logger', :debug? => false, :warn? => true, :fatal? => false) |
| 795 | + double('logger', :debug? => false, :warn? => true, :fatal? => false, :error? => false) |
796 | 796 | end |
797 | 797 |
|
798 | 798 | before do |
|
814 | 814 | before do |
815 | 815 | client.perform_request('DELETE', '_all') |
816 | 816 | client.perform_request('DELETE', 'myindex') rescue |
817 | | - client.perform_request('PUT', 'myindex', {}, { settings: { number_of_shards: 10 } }) |
| 817 | + client.perform_request('PUT', 'myindex', {}, { settings: { number_of_shards: 2, number_of_replicas: 0 } }) |
818 | 818 | client.perform_request('PUT', 'myindex/mydoc/1', { routing: 'XYZ', timeout: '1s' }, { foo: 'bar' }) |
819 | 819 | client.perform_request('GET', '_cluster/health?wait_for_status=green', {}) |
820 | 820 | end |
|
0 commit comments