Thu, 23 Mar 2023 12:14:53 +0000
client: Fix timeout handling
Previously, the timeout handler would fire an error that would get caught and
logged by the timer code. However that error never reached the upper levels of
scansion, leading to the whole thing just hanging.
Now we just trigger resumption of the async runner, and throw the error from
there if we haven't received the stanza yet.
With this change, timeouts are now correctly handled and reported as failures.
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 | [Client] Romeo |
11
48c77c05b9ba
basic.scs: Small changes to make work
Matthew Wild <mwild1@gmail.com>
parents:
0
diff
changeset
|
2 | jid: user@localhost |
48c77c05b9ba
basic.scs: Small changes to make work
Matthew Wild <mwild1@gmail.com>
parents:
0
diff
changeset
|
3 | password: password |
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | |
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | --------- |
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | |
106
4f7b1cab26c8
basic.scs: Add some comments
Matthew Wild <mwild1@gmail.com>
parents:
11
diff
changeset
|
7 | # Connect to the server |
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 | Romeo connects |
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 | |
106
4f7b1cab26c8
basic.scs: Add some comments
Matthew Wild <mwild1@gmail.com>
parents:
11
diff
changeset
|
10 | # Send initial presence |
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 | Romeo sends: |
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 | <presence/> |
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | |
106
4f7b1cab26c8
basic.scs: Add some comments
Matthew Wild <mwild1@gmail.com>
parents:
11
diff
changeset
|
14 | # Receive reflected initial presence |
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | Romeo receives: |
11
48c77c05b9ba
basic.scs: Small changes to make work
Matthew Wild <mwild1@gmail.com>
parents:
0
diff
changeset
|
16 | <presence/> |
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 | |
106
4f7b1cab26c8
basic.scs: Add some comments
Matthew Wild <mwild1@gmail.com>
parents:
11
diff
changeset
|
18 | # Disconnect from the server |
0
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 | Romeo disconnects |
2e31b584f8d9
It is better to write and run incomplete tests than not to run complete tests. -- Martin Fowler
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 |