synapse/tests/handlers
gui-yue 07468a0f1c
Increase timeout for test_lock_contention on RISC-V (#18430)
This PR addresses a test failure for
`tests.handlers.test_worker_lock.WorkerLockTestCase.test_lock_contention`
which consistently times out on the RISC-V (specifically `riscv64`)
architecture.

The test simulates high lock contention and has a default timeout of 5
seconds, which seems sufficient for architectures like x86_64 but proves
too short for current RISC-V hardware/environment performance
characteristics, leading to spurious `tests.utils.TestTimeout` failures.

This fix introduces architecture detection using `platform.machine()`.
If a RISC-V architecture is detected:
* The timeout for this specific test is increased (e.g., to 15 seconds
).

The original, stricter timeout (5 seconds) and lock count (500) are
maintained for all other architectures to avoid masking potential
performance regressions elsewhere.

This change has been tested locally on RISC-V, where the test now passes
reliably, and on x86_64, where it continues to pass with the original
constraints.

---

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [X] Pull request is based on the develop branch *(Assuming you based
it correctly)*
* [X] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
*(See below)*
* [X] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct (run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
*(Please run linters locally)*
2025-05-27 17:17:04 +00:00
..
__init__.py
oidc_test_key.p8 JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
oidc_test_key.pub.pem JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
test_admin.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_appservice.py Support for MSC4190: device management for application services (#17705) 2024-12-04 12:04:49 +01:00
test_auth.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_cas.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_deactivate_account.py Upon deactivation, forget all of the user's rooms (#17400) 2024-07-05 11:56:52 +01:00
test_device.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_directory.py Disable room list publication by default (#18175) 2025-02-24 12:06:16 +00:00
test_e2e_keys.py Create one-off scheduled task to delete old OTKs (#17934) 2024-11-19 11:20:48 +00:00
test_e2e_room_keys.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_federation_event.py Add locking to more safely delete state groups: Part 1 (#18107) 2025-02-03 17:29:15 +00:00
test_federation.py Remove support for python 3.8 (#17908) 2024-11-06 19:36:01 +00:00
test_message.py Improve event validation (#16908) 2024-03-19 17:52:53 +00:00
test_oauth_delegation.py Do not auto-provision missing users & devices when delegating auth to MAS (#18181) 2025-05-02 12:13:26 +02:00
test_oidc.py Allow only requiring a field be present in an SSO response, rather than specifying a required value (#18454) 2025-05-19 17:50:02 +01:00
test_password_providers.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_presence.py Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
test_profile.py Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
test_receipts.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_register.py Add option to allow registrations that begin with '_' (#18262) 2025-05-15 11:31:52 +00:00
test_room_list.py Disable room list publication by default (#18175) 2025-02-24 12:06:16 +00:00
test_room_member.py Remove support for python 3.8 (#17908) 2024-11-06 19:36:01 +00:00
test_room_policy.py Policy server part 1: Actually call the policy server (#18387) 2025-05-21 22:09:09 +00:00
test_room_summary.py Fix hierarchy returning 403 when room is accessible through federation (#17194) 2024-08-28 15:45:49 +01:00
test_room.py Add missing type hints to tests.handlers. (#14680) 2022-12-16 11:53:01 +00:00
test_saml.py feat: Allow multiple values for SSO attribute_requirements via comma separation (#17949) 2025-02-10 15:36:21 +00:00
test_send_email.py Add email.tlsname config option (#17849) 2024-12-17 18:05:38 -06:00
test_sliding_sync.py Pass leave from remote invite rejection down Sliding Sync (#18375) 2025-05-08 14:28:23 +00:00
test_sso.py Update license headers 2023-11-21 15:29:58 -05:00
test_stats.py Update license headers 2023-11-21 15:29:58 -05:00
test_sync.py Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
test_typing.py Fix bug where typing replication breaks (#17252) 2024-05-31 16:07:05 +01:00
test_user_directory.py Bump ruff from 0.7.3 to 0.11.10 (#18451) 2025-05-20 15:23:30 +01:00
test_worker_lock.py Increase timeout for test_lock_contention on RISC-V (#18430) 2025-05-27 17:17:04 +00:00