Skip to content

Conversation

@MadLittleMods
Copy link
Collaborator

@MadLittleMods MadLittleMods commented Jan 22, 2026

Fix TestAsyncUpload tests not being independent. Previously, they relied on being run sequentially.

Now you can run tests individually:

COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh ./tests/csapi -run TestAsyncUpload/Cannot_upload_to_a_media_ID_that_has_already_been_uploaded_to

This refactor is spawning from #839 where I wanted to specifically run the flaky test.

Dev notes

TestAsyncUpload originally introduced in #641


How to run in element-hq/synapse-rust-apps:

COMPLEMENT_REF=madlittlemods/fix-media-async-upload-tests-not-being-independent COMPLEMENT_TEST_PACKAGES=./tests/csapi/... ./scripts-dev/complement.sh -run TestAsyncUpload/Cannot_upload_to_a_media_ID_that_has_already_been_uploaded_to

Pull Request Checklist

Comment on lines +77 to +82
// TODO: This is the same as the test below (both use authenticated media). Previously
// this was testing unauthenticated vs authenticated media. We should resolve this by
// removing one of these tests or ideally, keeping both authenticated and
// unauthenticated tests and just gate it behind some homeserver check for
// unauthenticated media support (see
// https://github.com/matrix-org/complement/pull/746#discussion_r2718904066)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a future TODO (something to do in another PR).

See #746 (comment)

@MadLittleMods MadLittleMods marked this pull request as ready for review January 22, 2026 23:04
@MadLittleMods MadLittleMods requested review from a team as code owners January 22, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants