Sha256: 20060b3241b1d56651a264a997c22adcf38ddef309b81eeae2eafbf795dc6c65

Contents?: true

Size: 1.4 KB

Versions: 59

Compression:

Stored size: 1.4 KB

Contents

Dir.chdir File.join File.dirname(__FILE__), '../../../'
require './spec/env/iface.rb'

RSpec.describe "iface:driver:dispatch_spec" do
  include_context "iface:driver"

  it "Does automatically dispatch a blank array (signaling int_disptach) when a bulk queue is received prefixed with 'i' indicating incomplete-ness" do
    @pipe.puts ['i', [0, 0, "ping_nothing"]].to_json
    expect(@pipe).to readline_and_equal_json_x_within_y_seconds([], 6.seconds)
  end

  it "Does automatically dispatch a blank array (signaling int_disptach) when a blank queue is received prefixed with 'i' indicating incomplete-ness" do
    @pipe.puts ['i'].to_json
    expect(@pipe).to readline_and_equal_json_x_within_y_seconds([], 6.seconds)
  end


  it "Does not dispatch a blank array (signaling int_disptach) when a bulk queue is received prefixed without 'i' indicating incomplete-ness" do
    @pipe.puts [[0, 0, "ping_nothing"]].to_json
    expect(@pipe).not_to readline_and_equal_json_x_within_y_seconds([], 6.seconds)
  end

  #While at first you might think we need to test that int_dispatch called intra-respond of our if_event needs to test whether or not we still send
  #out blank [] to int_dispatch; this is not the case. In the real world, flok is supposed to also make any necessary if_disptach calls during all
  #int_dispatch calls. We would always receive back if_dispatch; and thus it would follow the same rules as layed out here
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
flok-0.0.82 spec/iface/driver/dispatch_spec.rb
flok-0.0.81 spec/iface/driver/dispatch_spec.rb
flok-0.0.80 spec/iface/driver/dispatch_spec.rb
flok-0.0.79 spec/iface/driver/dispatch_spec.rb
flok-0.0.78 spec/iface/driver/dispatch_spec.rb
flok-0.0.77 spec/iface/driver/dispatch_spec.rb
flok-0.0.76 spec/iface/driver/dispatch_spec.rb
flok-0.0.75 spec/iface/driver/dispatch_spec.rb
flok-0.0.74 spec/iface/driver/dispatch_spec.rb
flok-0.0.73 spec/iface/driver/dispatch_spec.rb
flok-0.0.72 spec/iface/driver/dispatch_spec.rb
flok-0.0.71 spec/iface/driver/dispatch_spec.rb
flok-0.0.70 spec/iface/driver/dispatch_spec.rb
flok-0.0.69 spec/iface/driver/dispatch_spec.rb
flok-0.0.68 spec/iface/driver/dispatch_spec.rb
flok-0.0.67 spec/iface/driver/dispatch_spec.rb
flok-0.0.66 spec/iface/driver/dispatch_spec.rb
flok-0.0.65 spec/iface/driver/dispatch_spec.rb
flok-0.0.64 spec/iface/driver/dispatch_spec.rb
flok-0.0.63 spec/iface/driver/dispatch_spec.rb