Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
884a5614
Commit
884a5614
authored
6 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Fix some tests which leaked logcontexts
parent
f5faf6bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_federation.py
+2
-2
2 additions, 2 deletions
tests/test_federation.py
tests/test_server.py
+2
-1
2 additions, 1 deletion
tests/test_server.py
with
4 additions
and
3 deletions
tests/test_federation.py
+
2
−
2
View file @
884a5614
...
...
@@ -123,8 +123,8 @@ class MessageAcceptTests(unittest.TestCase):
"
test.serv
"
,
lying_event
,
sent_to_us_directly
=
True
)
# Step the reactor, so the database fetches come back
self
.
reactor
.
advance
(
1
)
# Step the reactor, so the database fetches come back
self
.
reactor
.
advance
(
1
)
# on_receive_pdu should throw an error
failure
=
self
.
failureResultOf
(
d
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_server.py
+
2
−
1
View file @
884a5614
...
...
@@ -27,6 +27,7 @@ from synapse.api.errors import Codes, SynapseError
from
synapse.http.server
import
JsonResource
from
synapse.http.site
import
SynapseSite
,
logger
from
synapse.util
import
Clock
from
synapse.util.logcontext
import
make_deferred_yieldable
from
tests
import
unittest
from
tests.server
import
FakeTransport
,
make_request
,
render
,
setup_test_homeserver
...
...
@@ -95,7 +96,7 @@ class JsonResourceTests(unittest.TestCase):
d
=
Deferred
()
d
.
addCallback
(
_throw
)
self
.
reactor
.
callLater
(
1
,
d
.
callback
,
True
)
return
d
return
make_deferred_yieldable
(
d
)
res
=
JsonResource
(
self
.
homeserver
)
res
.
register_paths
(
"
GET
"
,
[
re
.
compile
(
"
^/_matrix/foo$
"
)],
_callback
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment