aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/spec
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-01-26 18:36:17 -0800
committerGravatar Tim Emiola <temiola@google.com>2015-01-26 18:44:59 -0800
commitd02d1d50b7da63b575d5dea2bb06a9994d141920 (patch)
tree7ab9da10c83849993a387be76fae954a1ef37e57 /src/ruby/spec
parent61ddba35fe7f3f9e859cd3a41c9afa65a4b8132a (diff)
Removes port_picker from call_spec.rb, removes a redundant test
Diffstat (limited to 'src/ruby/spec')
-rw-r--r--src/ruby/spec/call_spec.rb26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/ruby/spec/call_spec.rb b/src/ruby/spec/call_spec.rb
index 9a510df1f3..c793284488 100644
--- a/src/ruby/spec/call_spec.rb
+++ b/src/ruby/spec/call_spec.rb
@@ -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