Skip to content

Commit 453292b

Browse files
committed
Fix broken size test.
1 parent 7e1e4a8 commit 453292b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/async/container/notify/socket.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def send(**message)
6060
data = dump(message)
6161

6262
if data.bytesize > MAXIMUM_MESSAGE_SIZE
63-
raise ArgumentError, "Message length #{message.bytesize} exceeds #{MAXIMUM_MESSAGE_SIZE}: #{message.inspect}"
63+
raise ArgumentError, "Message length #{data.bytesize} exceeds #{MAXIMUM_MESSAGE_SIZE}: #{message.inspect}"
6464
end
6565

6666
@address.connect do |peer|

test/async/container/notify.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
context = server.bind
6767

6868
expect do
69-
client.send("x" * (subject::Socket::MAXIMUM_MESSAGE_SIZE+1))
70-
end.to raise_exception(ArgumentError)
69+
client.send(test: "x" * (subject::Socket::MAXIMUM_MESSAGE_SIZE+1))
70+
end.to raise_exception(ArgumentError, message: be =~ /Message length \d+ exceeds \d+/)
7171
end
7272
end
7373

0 commit comments

Comments
 (0)