-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracker consists of shard-pool; exposes dirty_list operation
- Loading branch information
Rafal Studnicki
authored and
Simon Zelazny
committed
Jul 4, 2017
1 parent
1ce6cb8
commit 1c9ab71
Showing
11 changed files
with
1,231 additions
and
939 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ defmodule Phoenix.PubSub.PG2Test do | |
@node1 :"[email protected]" | ||
@node2 :"[email protected]" | ||
|
||
@receive_timeout 500 | ||
|
||
setup config do | ||
size = config[:pool_size] || 1 | ||
if config[:pool_size] do | ||
|
@@ -29,15 +31,15 @@ defmodule Phoenix.PubSub.PG2Test do | |
|
||
PubSub.subscribe(config.pubsub, config.topic) | ||
:ok = PubSub.direct_broadcast(@node1, config.pubsub, config.topic, :ping) | ||
assert_receive {@node1, :ping} | ||
assert_receive {@node1, :ping}, @receive_timeout | ||
:ok = PubSub.direct_broadcast!(@node1, config.pubsub, config.topic, :ping) | ||
assert_receive {@node1, :ping} | ||
assert_receive {@node1, :ping}, @receive_timeout | ||
|
||
:ok = PubSub.direct_broadcast(@node2, config.pubsub, config.topic, :ping) | ||
refute_receive {@node1, :ping} | ||
refute_receive {@node1, :ping}, @receive_timeout | ||
|
||
:ok = PubSub.direct_broadcast!(@node2, config.pubsub, config.topic, :ping) | ||
refute_receive {@node1, :ping} | ||
refute_receive {@node1, :ping}, @receive_timeout | ||
end | ||
|
||
@tag pool_size: size, topic: topic | ||
|
@@ -46,15 +48,15 @@ defmodule Phoenix.PubSub.PG2Test do | |
|
||
PubSub.subscribe(config.pubsub, config.topic) | ||
:ok = PubSub.direct_broadcast_from(@node1, config.pubsub, self(), config.topic, :ping) | ||
assert_receive {@node1, :ping} | ||
assert_receive {@node1, :ping}, @receive_timeout | ||
:ok = PubSub.direct_broadcast_from!(@node1, config.pubsub, self(), config.topic, :ping) | ||
assert_receive {@node1, :ping} | ||
assert_receive {@node1, :ping}, @receive_timeout | ||
|
||
:ok = PubSub.direct_broadcast_from(@node2, config.pubsub, self(), config.topic, :ping) | ||
refute_receive {@node1, :ping} | ||
refute_receive {@node1, :ping}, @receive_timeout | ||
|
||
:ok = PubSub.direct_broadcast_from!(@node2, config.pubsub, self(), config.topic, :ping) | ||
refute_receive {@node1, :ping} | ||
refute_receive {@node1, :ping}, @receive_timeout | ||
end | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.