Software /
code /
prosody
Annotate
spec/scansion/keep_full_sub_req.scs @ 10486:479e96e554c8
net.server_epoll: Add debug logging for delayed reading
In :onreadable, if there is still buffered incoming data after reading
from the socket (as indicated by the :dirty method, usually because
LuaSocket has an 8k buffer that's full but it read a smaller amount),
another attempt to read is scheduled via this :pausefor method. This is
also called from some other places where it would be pointless to read
because there shouldn't be any data.
In the delayed read case, this should report that the socket is "dirty".
If it reports that the socket is "clean" then the question is where
the buffer contents went?
If this doesn't get logged after the scheduled time (0.000001s by
default) then this would suggests a problem with timer or scheduling.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 07 Dec 2019 19:05:10 +0100 |
parent | 9670:73e1bdc001ce |
child | 10515:35bf3b80480f |
rev | line source |
---|---|
9667
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 # server MUST keep a record of the complete presence stanza comprising the subscription request (#689) |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 [Client] Alice |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 jid: pars-a@localhost |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 password: password |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 [Client] Bob |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 jid: pars-b@localhost |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 password: password |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 |
9670
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
11 [Client] Bob's phone |
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
12 jid: pars-b@localhost/phone |
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
13 password: password |
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
14 |
9667
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 --------- |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 Alice connects |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 Alice sends: |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 <presence to="${Bob's JID}" type="subscribe"> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 <preauth xmlns="urn:xmpp:pars:0" token="1tMFqYDdKhfe2pwp" /> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 </presence> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 Alice disconnects |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 Bob connects |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 Bob sends: |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 <presence/> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 Bob receives: |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 <presence from="${Bob's full JID}"/> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
33 |
9669
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
34 Bob receives: |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
35 <presence from="${Alice's JID}" type="subscribe"> |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
36 <preauth xmlns="urn:xmpp:pars:0" token="1tMFqYDdKhfe2pwp" /> |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
37 </presence> |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
38 |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
39 Bob disconnects |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
40 |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
41 # Works if they reconnect too |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
42 |
9670
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
43 Bob's phone connects |
9669
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
44 |
9670
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
45 Bob's phone sends: |
9669
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
46 <presence/> |
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
47 |
9670
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
48 Bob's phone receives: |
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
49 <presence from="${Bob's phone's full JID}"/> |
9669
8c3ef65ecb40
spec/keep_full_sub_req: Verify that the presence subscription stays the same after a reconnect
Kim Alvefur <zash@zash.se>
parents:
9668
diff
changeset
|
50 |
9667
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
51 |
9670
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
52 Bob's phone receives: |
9668
6fbf8fa7ab8e
spec/keep_full_sub_req: Add missing type attribute
Kim Alvefur <zash@zash.se>
parents:
9667
diff
changeset
|
53 <presence from="${Alice's JID}" type="subscribe"> |
9667
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
54 <preauth xmlns="urn:xmpp:pars:0" token="1tMFqYDdKhfe2pwp" /> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
55 </presence> |
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
56 |
9670
73e1bdc001ce
spec/keep_full_sub_req: Make the second connect a differenct device (workaround for scansion issue)
Kim Alvefur <zash@zash.se>
parents:
9669
diff
changeset
|
57 Bob's phone disconnects |
9667
e41d8b12cb47
tests: Add scansion test for #689 about keeping the full subscription request stanza
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
58 |