Sha256: b7d6ab6e365489dfec86f844e694d0d50ac3d2ffb3fc52fbe232df863a868df6

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

require_relative './dummy_server'

class ClientJobDummy < Karousel::ClientJob
  @@dummy_data = 0 
  
  def self.reset
    @@dummy_data = 0
  end

  def self.reset_failures
  end

  def self.populate(karousel_size)
    @@dummy_data += karousel_size
    return [] if @@dummy_data > 100
    karousel_size.times.map { self.new }
  end

  def send
    @server = DummyServer.new
    @server.first_request
    rand(0..10) > 9 ? false : true
  end

  def finished?
    @server.following_request
    rand(0..10) > 8 ? false : true
  end

  def process
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
karousel-0.9.9 spec/support/client_job_dummy.rb
karousel-0.9.8 spec/support/client_job_dummy.rb