spec/messaging_spec.rb in avro_turf-1.11.0 vs spec/messaging_spec.rb in avro_turf-1.12.0

- old
+ new

@@ -423,6 +423,29 @@ it_behaves_like "encoding and decoding with the schema from schema store" it_behaves_like 'encoding and decoding with the schema from registry' it_behaves_like 'encoding and decoding with the schema_id from registry' end -end \ No newline at end of file + + context 'with a connect timeout' do + let(:avro) { + AvroTurf::Messaging.new( + registry_url: registry_url, + schemas_path: "spec/schemas", + logger: logger, + client_cert: client_cert, + client_key: client_key, + client_key_pass: client_key_pass, + connect_timeout: 10 + ) + } + + it_behaves_like "encoding and decoding with the schema from schema store" + it_behaves_like 'encoding and decoding with the schema from registry' + it_behaves_like 'encoding and decoding with the schema_id from registry' + + it 'passes the connect timeout setting to Excon' do + expect(Excon).to receive(:new).with(anything, hash_including(connect_timeout: 10)).and_call_original + avro + end + end +end