Skip to content
Snippets Groups Projects
Commit d02d1d50 authored by Tim Emiola's avatar Tim Emiola
Browse files

Removes port_picker from call_spec.rb, removes a redundant test

parent 61ddba35
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'grpc'
require 'port_picker'
include GRPC::Core::StatusCodes
......@@ -71,16 +70,8 @@ describe GRPC::Core::Call do
before(:each) do
@tag = Object.new
@client_queue = GRPC::Core::CompletionQueue.new
@server_queue = GRPC::Core::CompletionQueue.new
port = find_unused_tcp_port
host = "localhost:#{port}"
@server = GRPC::Core::Server.new(@server_queue, nil)
@server.add_http2_port(host)
@ch = GRPC::Core::Channel.new(host, nil)
end
after(:each) do
@server.close
fake_host = 'localhost:10101'
@ch = GRPC::Core::Channel.new(fake_host, nil)
end
describe '#start_read' do
......@@ -122,19 +113,6 @@ describe GRPC::Core::Call do
end
end
describe '#start_write' do
it 'should cause the WRITE_ACCEPTED event' do
call = make_test_call
call.invoke(@client_queue, @tag, @tag)
expect(call.start_write(GRPC::Core::ByteBuffer.new('test_start_write'),
@tag)).to be_nil
ev = @client_queue.next(deadline)
expect(ev.call).to be_a(GRPC::Core::Call)
expect(ev.type).to be(GRPC::Core::CompletionType::WRITE_ACCEPTED)
expect(ev.tag).to be(@tag)
end
end
describe '#status' do
it 'can save the status and read it back' do
call = make_test_call
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment