Author: bryanduxbury
Date: Tue Mar 24 05:23:52 2009
New Revision: 757668

URL: http://svn.apache.org/viewvc?rev=757668&view=rev
Log:
THRIFT-275. rb: Remove deprecated classes from Ruby library

This patch removes all the deprecation stuff and the t*.rb classes that were 
only placeholders. In addition, I've changed the implementations of some 
"abstract" methods to throw NotImplementedError instead of returning nil, and 
fixed the test accordingly. Finally, I removed the no longer required borrow 
and consume methods from all the transport implementations that had them. 
(Borrow and consume have been supplanted by the thrift_native package.) 

Removed:
    incubator/thrift/trunk/lib/rb/lib/thrift/deprecation.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/protocol/tbinaryprotocol.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/protocol/tprotocol.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/server/thttpserver.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/server/tserver.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/thrift.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/thttpclient.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/tsocket.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/ttransport.rb
    incubator/thrift/trunk/lib/rb/spec/backwards_compatibility_spec.rb
    incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb
Modified:
    incubator/thrift/trunk/lib/rb/lib/thrift.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/client.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/protocol.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/protocol/binaryprotocol.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/server.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/server/httpserver.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/httpclient.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/types.rb
    incubator/thrift/trunk/lib/rb/spec/protocol_spec.rb
    incubator/thrift/trunk/lib/rb/spec/transport_spec.rb
    incubator/thrift/trunk/test/rb/core/test_backwards_compatability.rb
    incubator/thrift/trunk/test/rb/core/test_exceptions.rb
    incubator/thrift/trunk/test/rb/core/transport/test_transport.rb

Modified: incubator/thrift/trunk/lib/rb/lib/thrift.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift.rb Tue Mar 24 05:23:52 2009
@@ -24,7 +24,6 @@
   DEPRECATION = false unless const_defined? :DEPRECATION
 end
 
-require 'thrift/deprecation'
 require 'thrift/exceptions'
 require 'thrift/types'
 require 'thrift/processor'

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/client.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/client.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/client.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/client.rb Tue Mar 24 05:23:52 2009
@@ -59,5 +59,4 @@
       end
     end
   end
-  deprecate_module! :ThriftClient => Client
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb Tue Mar 24 05:23:52 
2009
@@ -26,7 +26,6 @@
 
     attr_reader :message
   end
-  deprecate_class! :TException => Exception
 
   class ApplicationException < Exception
 
@@ -80,5 +79,4 @@
     end
 
   end
-  deprecate_class! :TApplicationException => ApplicationException
 end
\ No newline at end of file

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb Tue Mar 24 05:23:52 
2009
@@ -54,5 +54,4 @@
       oprot.trans.flush
     end
   end
-  deprecate_module! :TProcessor => Processor
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/protocol.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/protocol.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/protocol.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/protocol.rb Tue Mar 24 05:23:52 
2009
@@ -37,7 +37,6 @@
     end
 
   end
-  deprecate_class! :TProtocolException => ProtocolException
 
   class Protocol
 
@@ -55,173 +54,134 @@
     def write_message_begin(name, type, seqid)
       raise NotImplementedError
     end
-    deprecate! :writeMessageBegin => :write_message_begin
 
     def write_message_end; nil; end
-    deprecate! :writeMessageEnd => :write_message_end
 
     def write_struct_begin(name)
       raise NotImplementedError
     end
-    deprecate! :writeStructBegin => :write_struct_begin
 
     def write_struct_end; nil; end
-    deprecate! :writeStructEnd => :write_struct_end
 
     def write_field_begin(name, type, id)
       raise NotImplementedError
     end
-    deprecate! :writeFieldBegin => :write_field_begin
 
     def write_field_end; nil; end
-    deprecate! :writeFieldEnd => :write_field_end
 
     def write_field_stop
       raise NotImplementedError
     end
-    deprecate! :writeFieldStop => :write_field_stop
 
     def write_map_begin(ktype, vtype, size)
       raise NotImplementedError
     end
-    deprecate! :writeMapBegin => :write_map_begin
 
     def write_map_end; nil; end
-    deprecate! :writeMapEnd => :write_map_end
 
     def write_list_begin(etype, size)
       raise NotImplementedError
     end
-    deprecate! :writeListBegin => :write_list_begin
 
     def write_list_end; nil; end
-    deprecate! :writeListEnd => :write_list_end
 
     def write_set_begin(etype, size)
       raise NotImplementedError
     end
-    deprecate! :writeSetBegin => :write_set_begin
 
     def write_set_end; nil; end
-    deprecate! :writeSetEnd => :write_set_end
 
     def write_bool(bool)
       raise NotImplementedError
     end
-    deprecate! :writeBool => :write_bool
 
     def write_byte(byte)
       raise NotImplementedError
     end
-    deprecate! :writeByte => :write_byte
 
     def write_i16(i16)
       raise NotImplementedError
     end
-    deprecate! :writeI16 => :write_i16
 
     def write_i32(i32)
       raise NotImplementedError
     end
-    deprecate! :writeI32 => :write_i32
 
     def write_i64(i64)
       raise NotImplementedError
     end
-    deprecate! :writeI64 => :write_i64
 
     def write_double(dub)
       raise NotImplementedError
     end
-    deprecate! :writeDouble => :write_double
 
     def write_string(str)
       raise NotImplementedError
     end
-    deprecate! :writeString => :write_string
 
     def read_message_begin
       raise NotImplementedError
     end
-    deprecate! :readMessageBegin => :read_message_begin
 
     def read_message_end; nil; end
-    deprecate! :readMessageEnd => :read_message_end
 
     def read_struct_begin
       raise NotImplementedError
     end
-    deprecate! :readStructBegin => :read_struct_begin
 
     def read_struct_end; nil; end
-    deprecate! :readStructEnd => :read_struct_end
 
     def read_field_begin
       raise NotImplementedError
     end
-    deprecate! :readFieldBegin => :read_field_begin
 
     def read_field_end; nil; end
-    deprecate! :readFieldEnd => :read_field_end
 
     def read_map_begin
       raise NotImplementedError
     end
-    deprecate! :readMapBegin => :read_map_begin
 
     def read_map_end; nil; end
-    deprecate! :readMapEnd => :read_map_end
 
     def read_list_begin
       raise NotImplementedError
     end
-    deprecate! :readListBegin => :read_list_begin
 
     def read_list_end; nil; end
-    deprecate! :readListEnd => :read_list_end
 
     def read_set_begin
       raise NotImplementedError
     end
-    deprecate! :readSetBegin => :read_set_begin
 
     def read_set_end; nil; end
-    deprecate! :readSetEnd => :read_set_end
 
     def read_bool
       raise NotImplementedError
     end
-    deprecate! :readBool => :read_bool
 
     def read_byte
       raise NotImplementedError
     end
-    deprecate! :readByte => :read_byte
 
     def read_i16
       raise NotImplementedError
     end
-    deprecate! :readI16 => :read_i16
 
     def read_i32
       raise NotImplementedError
     end
-    deprecate! :readI32 => :read_i32
 
     def read_i64
       raise NotImplementedError
     end
-    deprecate! :readI64 => :read_i64
 
     def read_double
       raise NotImplementedError
     end
-    deprecate! :readDouble => :read_double
 
     def read_string
       raise NotImplementedError
     end
-    deprecate! :readString => :read_string
 
     def write_field(name, type, fid, value)
       write_field_begin(name, type, fid)
@@ -323,11 +283,10 @@
     end
 
   end
-  deprecate_class! :TProtocol => Protocol
 
   class ProtocolFactory
-    def get_protocol(trans); nil; end
-    deprecate! :getProtocol => :get_protocol
+    def get_protocol(trans)
+      raise NotImplementedError
+    end
   end
-  deprecate_class! :TProtocolFactory => ProtocolFactory
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/protocol/binaryprotocol.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/protocol/binaryprotocol.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/protocol/binaryprotocol.rb 
(original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/protocol/binaryprotocol.rb Tue Mar 
24 05:23:52 2009
@@ -216,12 +216,10 @@
     end
 
   end
-  deprecate_class! :TBinaryProtocol => BinaryProtocol
 
   class BinaryProtocolFactory < ProtocolFactory
     def get_protocol(trans)
       return Thrift::BinaryProtocol.new(trans)
     end
   end
-  deprecate_class! :TBinaryProtocolFactory => BinaryProtocolFactory
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/server.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/server.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/server.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/server.rb Tue Mar 24 05:23:52 2009
@@ -32,7 +32,6 @@
 
     def serve; nil; end
   end
-  deprecate_class! :TServer => Server
 
   class SimpleServer < Server
     def serve
@@ -56,7 +55,6 @@
       end
     end
   end
-  deprecate_class! :TSimpleServer => SimpleServer
 end
 
 # do *not* use fastthread
@@ -88,7 +86,6 @@
       end
     end
   end
-  deprecate_class! :TThreadedServer => ThreadedServer
 
   class ThreadPoolServer < Server
     def initialize(processor, serverTransport, transportFactory=nil, 
protocolFactory=nil, num=20)
@@ -142,5 +139,4 @@
       end
     end
   end
-  deprecate_class! :TThreadPoolServer => ThreadPoolServer
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/server/httpserver.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/server/httpserver.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/server/httpserver.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/server/httpserver.rb Tue Mar 24 
05:23:52 2009
@@ -59,5 +59,4 @@
       @server.run.join
     end
   end
-  deprecate_class! :TSimpleMongrelHTTPServer => SimpleMongrelHTTPServer
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb Tue Mar 24 05:23:52 2009
@@ -292,5 +292,4 @@
         :element => field[:element] }
     end
   end
-  deprecate_module! :ThriftStruct => Struct
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/transport.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/transport.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/transport.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/transport.rb Tue Mar 24 05:23:52 
2009
@@ -32,15 +32,10 @@
       @type = type
     end
   end
-  deprecate_class! :TTransportException => TransportException
 
-# Transport is basically an abstract class, but isn't raising 
NotImplementedError
-# TODO: Think about if this is the right thing - Kevin Clark - 3/27/08
   class Transport
     def open?; end
-    deprecate! :isOpen => :open?
-    deprecate! :is_open? => :open?
-
+    
     def open; end
 
     def close; end
@@ -59,33 +54,34 @@
     
       buf
     end
-    deprecate! :readAll => :read_all
   
     def write(buf); end
     alias_method :<<, :write
 
     def flush; end
   end
-  deprecate_class! :TTransport => Transport
 
   class ServerTransport
-    def listen; nil; end
-
-    def accept; nil; end
+    def listen
+      raise NotImplementedError
+    end
 
+    def accept
+      raise NotImplementedError
+    end
+      
     def close; nil; end
 
-    def closed?; nil; end
+    def closed?
+      raise NotImplementedError
+    end
   end
-  deprecate_class! :TServerTransport => ServerTransport
 
   class TransportFactory
     def get_transport(trans)
       return trans
     end
-    deprecate! :getTransport => :get_transport
   end
-  deprecate_class! :TTransportFactory => TransportFactory
 
   class BufferedTransport < Transport
     DEFAULT_BUFFER = 4096
@@ -131,34 +127,13 @@
       
       @transport.flush
     end
-
-    def borrow(requested_length = 0)
-      # $stderr.puts "#{Time.now.to_f} Have #[email protected]} asking for 
#{requested_length.inspect}"
-      return @rbuf if @rbuf.length > requested_length
-      
-      if @rbuf.length < DEFAULT_BUFFER
-        @rbuf << @transport.read([requested_length, DEFAULT_BUFFER].max)
-      end
-      
-      if @rbuf.length < requested_length
-        @rbuf << @transport.read_all(requested_length - @rbuf.length)
-      end
-    
-      @rbuf
-    end
-    
-    def consume!(size)
-      @rbuf.slice!(0...size)
-    end
   end
-  deprecate_class! :TBufferedTransport => BufferedTransport
 
   class BufferedTransportFactory < TransportFactory
     def get_transport(transport)
       return BufferedTransport.new(transport)
     end
   end
-  deprecate_class! :TBufferedTransportFactory => BufferedTransportFactory
 
   class FramedTransport < Transport
     def initialize(transport, read=true, write=true)
@@ -211,17 +186,6 @@
       @wbuf = ''
     end
 
-    def borrow(requested_length = 0)
-      read_frame if @rbuf.empty?
-      # there isn't any more coming, so if it's not enough, it's an error.
-      raise EOFError if requested_length > @rbuf.size
-      @rbuf
-    end
-    
-    def consume!(size)
-      @rbuf.slice!(0...size)
-    end
-
     private
 
     def read_frame
@@ -230,14 +194,12 @@
       @rbuf = @transport.read_all(sz).dup # protect against later #slice!
     end
   end
-  deprecate_class! :TFramedTransport => FramedTransport
 
   class FramedTransportFactory < TransportFactory
     def get_transport(transport)
       return FramedTransport.new(transport)
     end
   end
-  deprecate_class! :TFramedTransportFactory => FramedTransportFactory
 
   class MemoryBuffer < Transport
     GARBAGE_BUFFER_SIZE = 4*(2**10) # 4kB
@@ -294,19 +256,6 @@
     def flush
     end
 
-    # For fast binary protocol access
-    def borrow(size = nil)
-      if size.nil?
-        @[email protected]]
-      else
-        if size > available
-          raise EOFError # Memory buffers only get one shot.
-        else
-          @b...@index, size]
-        end
-      end
-    end
-
     def inspect_buffer
       out = []
       for idx in 0...(@buf.size)
@@ -322,10 +271,7 @@
       end
       out.join(" ")
     end
-
-    alias_method :consume!, :read
   end
-  deprecate_class! :TMemoryBuffer => MemoryBuffer
 
   ## Very very simple implementation of wrapping two objects, one with a #read
   ## method and one with a #write method, into a transport for thrift.
@@ -343,5 +289,4 @@
     def close; @input.close; @output.close end
     def to_io; @input end # we're assuming this is used in a IO.select for 
reading
   end
-  deprecate_class! :TIOStreamTransport => IOStreamTransport
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/transport/httpclient.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/transport/httpclient.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/transport/httpclient.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/transport/httpclient.rb Tue Mar 24 
05:23:52 2009
@@ -44,5 +44,4 @@
       @outbuf = ""
     end
   end
-  deprecate_class! :THttpClient => HTTPClient
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb Tue Mar 24 
05:23:52 2009
@@ -132,7 +132,6 @@
       @handle
     end
   end
-  deprecate_class! :TSocket => Socket
 
   class ServerSocket < ServerTransport
     # call-seq: initialize(host = nil, port)
@@ -173,5 +172,4 @@
 
     alias to_io handle
   end
-  deprecate_class! :TServerSocket => ServerSocket
 end

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/types.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/types.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/types.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/types.rb Tue Mar 24 05:23:52 2009
@@ -35,7 +35,6 @@
     SET = 14
     LIST = 15
   end
-  deprecate_module! :TType => Types
 
   class << self
     attr_accessor :type_checking
@@ -96,7 +95,6 @@
     REPLY = 2
     EXCEPTION = 3
   end
-  deprecate_module! :TMessageType => MessageTypes
 end
 
 Thrift.type_checking = false if Thrift.type_checking.nil?

Modified: incubator/thrift/trunk/lib/rb/spec/protocol_spec.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/protocol_spec.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/protocol_spec.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/protocol_spec.rb Tue Mar 24 05:23:52 2009
@@ -134,9 +134,9 @@
   end
 
   describe ProtocolFactory do
-    it "should return nil" do
+    it "should raise NotImplementedError" do
       # returning nil since Protocol is just an abstract class
-      ProtocolFactory.new.get_protocol(mock("MockTransport")).should be_nil
+      lambda {ProtocolFactory.new.get_protocol(mock("MockTransport"))}.should 
raise_error(NotImplementedError)
     end
   end
 end

Modified: incubator/thrift/trunk/lib/rb/spec/transport_spec.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/transport_spec.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/transport_spec.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/transport_spec.rb Tue Mar 24 05:23:52 
2009
@@ -221,40 +221,6 @@
       @trans.should_receive(:write).with("\000\000\000\000")
       ftrans.flush
     end
-    
-    it "should refill its buffer when borrow is called and it is empty" do
-      ftrans = FramedTransport.new(@trans)
-      @trans.should_receive(:read_all).with(4).and_return([10].pack("N"))
-      @trans.should_receive(:read_all).with(10).and_return("1234567890")
-      ftrans.borrow(10).should == "1234567890"
-    end
-    
-    it "should not consume any data when borrow is called" do
-      ftrans = FramedTransport.new(@trans)
-      @trans.should_receive(:read_all).with(4).and_return([10].pack("N"))
-      @trans.should_receive(:read_all).with(10).and_return("1234567890")
-      ftrans.borrow(10).should == "1234567890"
-      ftrans.borrow(10).should == "1234567890"
-    end
-    
-    it "should remove data from the buffer when consume! is called" do
-      ftrans = FramedTransport.new(@trans)
-      
@trans.should_receive(:read_all).with(4).ordered.and_return([10].pack("N"))
-      
@trans.should_receive(:read_all).with(10).ordered.and_return("1234567890")
-      ftrans.borrow(5).should == "1234567890"
-      ftrans.consume!(5).should == "12345"
-      ftrans.borrow(5).should == "67890"
-    end
-    
-    it "should raise an EOFError when it is out of data and borrow is called" 
do
-      ftrans = FramedTransport.new(@trans)
-      
@trans.should_receive(:read_all).with(4).ordered.and_return([10].pack("N"), 
[0].pack("N"))
-      
@trans.should_receive(:read_all).with(10).ordered.and_return("1234567890")
-      @trans.should_receive(:read_all).with(0).ordered.and_return("")
-      ftrans.borrow(10).should == "1234567890"
-      ftrans.consume!(10).should == "1234567890"
-      lambda {ftrans.borrow(10)}.should raise_error(EOFError)
-    end
   end
 
   describe FramedTransportFactory do

Modified: incubator/thrift/trunk/test/rb/core/test_backwards_compatability.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/test/rb/core/test_backwards_compatability.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/test/rb/core/test_backwards_compatability.rb 
(original)
+++ incubator/thrift/trunk/test/rb/core/test_backwards_compatability.rb Tue Mar 
24 05:23:52 2009
@@ -1,6 +1,6 @@
 require File.join(File.dirname(__FILE__), '../test_helper')
 
-require 'thrift/thrift'
+require 'thrift'
 
 class TestThriftException < Test::Unit::TestCase
   def test_has_accessible_message

Modified: incubator/thrift/trunk/test/rb/core/test_exceptions.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/test/rb/core/test_exceptions.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/test/rb/core/test_exceptions.rb (original)
+++ incubator/thrift/trunk/test/rb/core/test_exceptions.rb Tue Mar 24 05:23:52 
2009
@@ -1,6 +1,6 @@
 require File.join(File.dirname(__FILE__), '../test_helper')
 
-require 'thrift/thrift'
+require 'thrift'
 
 class TestException < Test::Unit::TestCase
   def test_has_accessible_message

Modified: incubator/thrift/trunk/test/rb/core/transport/test_transport.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/test/rb/core/transport/test_transport.rb?rev=757668&r1=757667&r2=757668&view=diff
==============================================================================
--- incubator/thrift/trunk/test/rb/core/transport/test_transport.rb (original)
+++ incubator/thrift/trunk/test/rb/core/transport/test_transport.rb Tue Mar 24 
05:23:52 2009
@@ -30,10 +30,6 @@
     assert_nil @trans.close
   end
   
-  def test_read
-    assert_nil @trans.read(100) # arbitrary size
-  end
-  
   # TODO:
   # This doesn't necessarily test he right thing.
   # It _looks_ like read isn't guarenteed to return the length


Reply via email to