aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-08-26 09:17:56 +0200
committerAnders Svensson <[email protected]>2012-08-26 09:46:36 +0200
commitbde27ba6edd16e1892318f7354d0b1956859a7c4 (patch)
tree878b61646d30bbc48a4c176ceba991e03256cee2 /lib/diameter/test
parentcfea5eea406ba3af96588ff458e55de9a149d9c5 (diff)
downloadotp-bde27ba6edd16e1892318f7354d0b1956859a7c4.tar.gz
otp-bde27ba6edd16e1892318f7354d0b1956859a7c4.tar.bz2
otp-bde27ba6edd16e1892318f7354d0b1956859a7c4.zip
Fix timing issue with subscribe in test suites
Has to happen before add_transport to be sure of getting the subsequent event.
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_util.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl
index 0c42f955ad..c3f5cbf0e2 100644
--- a/lib/diameter/test/diameter_util.erl
+++ b/lib/diameter/test/diameter_util.erl
@@ -275,8 +275,8 @@ connect(Client, Prot, LRef) ->
connect(Client, Prot, LRef, Opts) ->
[PortNr] = lport(Prot, LRef, 20),
- Ref = add_transport(Client, {connect, opts(Prot, PortNr) ++ Opts}),
true = diameter:subscribe(Client),
+ Ref = add_transport(Client, {connect, opts(Prot, PortNr) ++ Opts}),
ok = receive
{diameter_event, Client, {up, Ref, _, _, _}} -> ok
after 2000 ->