Sha256: a4388eb09511ca86abbb0769f4185e064a529488da03db67762c852d3a8091b1

Contents?: true

Size: 583 Bytes

Versions: 13

Compression:

Stored size: 583 Bytes

Contents

require ::File.expand_path('../resource.pb', __FILE__)

Test::ResourceService.class_eval do
  # request -> Test::ResourceFindRequest
  # response -> Test::Resource
  def find
    response.name = request.name
    response.status = request.active ? 1 : 0
  end

  # request -> Test::ResourceSleepRequest
  # response -> Test::Resource
  def find_with_sleep
    sleep(request.sleep || 1)
    response.name = 'Request should have timed out'
  end

  # request -> Test::ResourceFindRequest
  # response -> Test::Resource
  def find_with_rpc_failed
    rpc_failed('Find failed')
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
protobuf-3.5.5 spec/support/test/resource_service.rb
protobuf-3.5.4 spec/support/test/resource_service.rb
protobuf-3.5.3 spec/support/test/resource_service.rb
protobuf-3.5.2 spec/support/test/resource_service.rb
protobuf-3.5.1 spec/support/test/resource_service.rb
prepor-protobuf-3.5.1 spec/support/test/resource_service.rb
prepor-protobuf-3.5.0 spec/support/test/resource_service.rb
protobuf-3.5.0 spec/support/test/resource_service.rb
protobuf-3.4.4 spec/support/test/resource_service.rb
protobuf-3.4.3 spec/support/test/resource_service.rb
protobuf-3.4.2 spec/support/test/resource_service.rb
protobuf-3.4.1 spec/support/test/resource_service.rb
protobuf-3.4.0 spec/support/test/resource_service.rb