Skip to content

Commit 2e74461

Browse files
committed
Mark broken specs as pending
Same finding as #20 (comment)
1 parent b574d8f commit 2e74461

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

spec/device_spec.cr

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ require "./spec_helper"
22

33
FRONT_ENDPOINT = "inproc://device_front_test"
44
BACK_ENDPOINT = "inproc://device_back_test"
5-
CHANNEL = Channel(String).new
5+
CHANNEL = Channel(String).new
66

77
def create_streamer
8-
ZMQ::Context.create(ZMQ::PUSH, ZMQ::PULL) do |ctx,(front, back)|
9-
back.bind(BACK_ENDPOINT) || puts("Not able to bind to #{BACK_ENDPOINT}")
8+
ZMQ::Context.create(ZMQ::PUSH, ZMQ::PULL) do |ctx, (front, back)|
9+
back.bind(BACK_ENDPOINT) || puts("Not able to bind to #{BACK_ENDPOINT}")
1010
front.bind(FRONT_ENDPOINT) || puts("Not able to bind to #{FRONT_ENDPOINT}")
1111
CHANNEL.send "ping"
1212
ZMQ::Device.new(back, front)
@@ -15,7 +15,7 @@ def create_streamer
1515
end
1616

1717
def create_raw_streamer
18-
ZMQ::Context.create(ZMQ::ROUTER, ZMQ::DEALER) do |ctx,(frontend, backend)|
18+
ZMQ::Context.create(ZMQ::ROUTER, ZMQ::DEALER) do |ctx, (frontend, backend)|
1919
frontend.bind(FRONT_ENDPOINT)
2020
backend.bind(BACK_ENDPOINT)
2121

@@ -46,12 +46,13 @@ def create_raw_streamer
4646
end
4747

4848
describe ZMQ::Device do
49-
it "is able to send messages through the device" do
49+
# pending because it hangs
50+
pending "is able to send messages through the device" do
5051
spawn create_streamer # wait_for_device
5152
CHANNEL.receive
5253

5354
spawn do
54-
ZMQ::Context.create(ZMQ::PUSH, ZMQ::PULL) do |ctx,(pusher, puller)|
55+
ZMQ::Context.create(ZMQ::PUSH, ZMQ::PULL) do |ctx, (pusher, puller)|
5556
APIHelper.connect_to_inproc(pusher, BACK_ENDPOINT)
5657
APIHelper.connect_to_inproc(puller, FRONT_ENDPOINT)
5758

spec/nonblocking_socket_spec.cr

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ require "./spec_helper"
33
ENDPOINT = "inproc://nonblocking_test"
44

55
def behave_like_a_soket(receiver)
6-
it "returns false when there are no message to read" do
6+
pending "returns false when there are no message to read" do
77
receiver.receive_string(ZMQ::DONTWAIT).should eq("")
88
ZMQ::Util.errno.should eq(ZMQ::EAGAIN)
99
end
1010

11-
it "returns false when there are no messages to read" do
11+
pending "returns false when there are no messages to read" do
1212
receiver.receive_messages(ZMQ::DONTWAIT).should eq([] of ZMQ::Message)
1313
ZMQ::Util.errno.should eq(ZMQ::EAGAIN)
1414
end
1515
end
1616

1717
def behave_like_a_soket_without_envelopes(sender, receiver)
18-
it "read the single message and returns a successful result code" do
18+
pending "read the single message and returns a successful result code" do
1919
APIHelper.poll_it_for_read(receiver) do
2020
sender.send_string("test").should be_true
2121
end
2222

2323
receiver.receive_messages(ZMQ::DONTWAIT).size.should eq(1)
2424
end
2525

26-
it "read all message parts transmitted and returns a successful result code" do
26+
pending "read all message parts transmitted and returns a successful result code" do
2727
APIHelper.poll_it_for_read(receiver) do
2828
strings = Array.new(10, "test")
2929
sender.send_strings(strings).should be_true
@@ -34,15 +34,15 @@ def behave_like_a_soket_without_envelopes(sender, receiver)
3434
end
3535

3636
def behave_like_a_soket_with_envelopes(sender, receiver)
37-
it "read the single message and returns a successful result code" do
37+
pending "read the single message and returns a successful result code" do
3838
APIHelper.poll_it_for_read(receiver) do
3939
sender.send_string("test").should be_true
4040
end
4141

4242
receiver.receive_messages(ZMQ::DONTWAIT).size.should eq(1 + 1) # extra 1 for envelope
4343
end
4444

45-
it "read all message parts transmitted and returns a successful result code" do
45+
pending "read all message parts transmitted and returns a successful result code" do
4646
APIHelper.poll_it_for_read(receiver) do
4747
strings = Array.new(10, "test")
4848
sender.send_strings(strings).should be_true
@@ -77,7 +77,7 @@ describe ZMQ::Socket do
7777

7878
# NOTE: To be able to send multiple REQ-REP messagess use XREQ or XREP. Please see last spec context
7979
context "REQ" do
80-
context "non-blocking #receive_messages where sender binds and receiver connects" do
80+
context "non-blocking #receive_messages where sender binds and receiver connects" do
8181
APIHelper.with_pair_sockets(ZMQ::REQ, ZMQ::REP) do |sender, receiver|
8282
receiver.bind ENDPOINT
8383
APIHelper.connect_to_inproc(sender, ENDPOINT)

spec/socket_spec.cr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require "./spec_helper"
22

3-
STRING = "boogy-boogy"
3+
STRING = "boogy-boogy"
44
PING_ENDPOINT = "inproc://ping_ping_test"
55

66
describe ZMQ::Socket do
@@ -160,7 +160,7 @@ describe ZMQ::Socket do
160160
end
161161
end
162162

163-
it "generate a EFSM error when sending via the REQ socket twice in a row without an intervening receive operation" do
163+
pending "generate a EFSM error when sending via the REQ socket twice in a row without an intervening receive operation" do
164164
APIHelper.with_pair_sockets(ZMQ::REQ, ZMQ::REP) do |ping, pong|
165165
ping.bind PING_ENDPOINT
166166
APIHelper.connect_to_inproc pong, PING_ENDPOINT

0 commit comments

Comments
 (0)