10000 Workaround rspec mutex which causes race condition to fail tests. · socketry/async-dns@b0517f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit b0517f3

Browse files
committed
Workaround rspec mutex which causes race condition to fail tests.
1 parent fbee876 commit b0517f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/async/dns/junk_server_context.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# THE SOFTWARE.
2020

2121
RSpec.shared_context "Junk UDP Server" do
22-
let(:server_endpoint) {Async::IO::Endpoint.udp('0.0.0.0', 6060, reuse_port: true)}
22+
let!(:server_endpoint) {Async::IO::Endpoint.udp('0.0.0.0', 6060, reuse_port: true)}
2323

2424
let!(:server_task) do
2525
reactor.async do
@@ -42,7 +42,7 @@
4242
end
4343

4444
RSpec.shared_context "Junk TCP Server" do
45-
let(:server_endpoint) {Async::IO::Endpoint.tcp('0.0.0.0', 6060, reuse_port: true)}
45+
let!(:server_endpoint) {Async::IO::Endpoint.tcp('0.0.0.0', 6060, reuse_port: true)}
4646

4747
let!(:server_task) do
4848
reactor.async do

0 commit comments

Comments
 (0)
0