Skip to content

Commit 115cbc9

Browse files
authored
Merge pull request #284 from labthings/fix-tests
Fix an intermittent test failure
2 parents ac66808 + 8f8c3d3 commit 115cbc9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_invocation_contexts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def run_function_in_thread_and_propagate_cancellation(func, *args):
225225
t = ThreadWithInvocationID(target=func, args=args)
226226
t.start()
227227
try:
228-
t.join_and_propagate_cancel(1)
228+
t.join_and_propagate_cancel(0.04)
229229
except InvocationCancelledError:
230230
# We still want to return the finished thread if it's
231231
# cancelled.

tests/test_server_config_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ def test_unimportable_modules():
109109

110110
with pytest.raises(
111111
ThingImportFailure,
112-
match="\[RuntimeError\] This module should not be importable!",
112+
match=r"\[RuntimeError\] This module should not be importable!",
113113
):
114114
# This checks RuntimErrors get reported with a single error
115115
ThingConfig(cls="tests.unimportable.runtimeerror:SomeClass")
116116

117117
with pytest.raises(
118118
ThingImportFailure,
119-
match="\[ValueError\] This module should not be importable due to ValueError!",
119+
match=r"\[ValueError\] This module should not be importable due to ValueError!",
120120
):
121121
# This checks ValueErrors get reported with a single error
122122
# rather than getting swallowed by a ValidationError

0 commit comments

Comments
 (0)