Lines Matching full:to
2 # Licensed to the Apache Software Foundation (ASF) under one
6 # to you under the Apache License, Version 2.0 (the
12 # Unless required by applicable law or agreed to in writing,
32 it "should default to BaseTransportFactory and BinaryProtocolFactory when not specified" do
34 …expect(@server.instance_variable_get(:'@transport_factory')).to be_an_instance_of(Thrift::BaseTran…
35 …expect(@server.instance_variable_get(:'@protocol_factory')).to be_an_instance_of(Thrift::BinaryPro…
39 expect { @server.serve()}.to raise_error(NotImplementedError)
43 expect(@serverTrans).to receive(:to_s).once.and_return("serverTrans")
44 expect(@trans).to receive(:to_s).once.and_return("trans")
45 expect(@prot).to receive(:to_s).once.and_return("prot")
46 expect(@server.to_s).to eq("server(prot(trans(serverTrans)))")
61 expect(@serverTrans).to receive(:to_s).once.and_return("serverTrans")
62 expect(@trans).to receive(:to_s).once.and_return("trans")
63 expect(@prot).to receive(:to_s).once.and_return("prot")
64 expect(@server.to_s).to eq("simple(server(prot(trans(serverTrans))))")
68 expect(@serverTrans).to receive(:listen).ordered
69 expect(@serverTrans).to receive(:accept).exactly(3).times.and_return(@client)
70 expect(@trans).to receive(:get_transport).exactly(3).times.with(@client).and_return(@trans)
71 expect(@prot).to receive(:get_protocol).exactly(3).times.with(@trans).and_return(@prot)
73 expect(@processor).to receive(:process).exactly(3).times.with(@prot, @prot) do
80 expect(@trans).to receive(:close).exactly(3).times
81 expect(@serverTrans).to receive(:close).ordered
82 expect { @server.serve }.to throw_symbol(:stop)
97 expect(@serverTrans).to receive(:to_s).once.and_return("serverTrans")
98 expect(@trans).to receive(:to_s).once.and_return("trans")
99 expect(@prot).to receive(:to_s).once.and_return("prot")
100 expect(@server.to_s).to eq("threaded(server(prot(trans(serverTrans))))")
104 expect(@serverTrans).to receive(:listen).ordered
105 expect(@serverTrans).to receive(:accept).exactly(3).times.and_return(@client)
106 expect(@trans).to receive(:get_transport).exactly(3).times.with(@client).and_return(@trans)
107 expect(@prot).to receive(:get_protocol).exactly(3).times.with(@trans).and_return(@prot)
108 expect(Thread).to receive(:new).with(@prot, @trans).exactly(3).times.and_yield(@prot, @trans)
110 expect(@processor).to receive(:process).exactly(3).times.with(@prot, @prot) do
117 expect(@trans).to receive(:close).exactly(3).times
118 expect(@serverTrans).to receive(:close).ordered
119 expect { @server.serve }.to throw_symbol(:stop)
135 expect(@server_trans).to receive(:to_s).once.and_return("server_trans")
136 expect(@trans).to receive(:to_s).once.and_return("trans")
137 expect(@prot).to receive(:to_s).once.and_return("prot")
138 expect(@server.to_s).to eq("threadpool(server(prot(trans(server_trans))))")
143 expect_any_instance_of(described_class).to receive(:serve) do
146 expect { @server.rescuable_serve }.to(raise_error('ERROR'))
152 expect_any_instance_of(described_class).to receive(:serve) do
156 expect { @server.rescuable_serve }.to(raise_error('ERROR1'))
157 expect { @server.rescuable_serve }.to(raise_error('ERROR2'))
165 expect(@server_trans).to receive(:listen).ordered
166 expect(thread_q).to receive(:push).with(:token)
167 expect(thread_q).to receive(:pop)
168 expect(Thread).to receive(:new).and_yield
169 expect(@server_trans).to receive(:accept).exactly(3).times.and_return(@client)
170 expect(@trans).to receive(:get_transport).exactly(3).times.and_return(@trans)
171 expect(@prot).to receive(:get_protocol).exactly(3).times.and_return(@prot)
174 expect(@processor).to receive(:process).exactly(3).times.with(@prot, @prot) do
181 expect(@trans).to receive(:close).exactly(3).times
182 expect(exception_q).to receive(:push).with(error).and_throw(:stop)
183 expect(@server_trans).to receive(:close)
184 expect { @server.serve }.to(throw_symbol(:stop))