mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-26 18:20:40 -04:00
The test relied on the fact that sending an event from a given timeline is not observable from another timeline. Indeed, it sent a message using a first timeline object, then constructed a second timeline object and expected only the remote event to be in there. Now, the sending queue is shared across all instances of a Room, thus all instances of a Timeline, and the second timeline can see the local echo for the message sent by the first timeline. The "fix" is thus in the test structure itself: when waiting for the remote echo to be there, check that the timeline item doesn't pertain to a local echo, i.e. is a remote echo.
Matrix SDK integration test
Requirements
This requires a synapse backend with a ci patched configuration. You can easily get
it up and running with docker compose via:
docker compose -f assets/docker-compose.yml up -d
docker compose -f assets/docker-compose.yml logs --tail 100 -f
Note that this works also with podman compose.
Patches
You can see the patches we do to configuration (namely activate registration and
resetting rate limits), check out what assets/ci-start.sh changes.
Running
The integration tests can be run with cargo test or cargo nextest run.
The integration tests expect the environment variables HOMESERVER_URL to be the HTTP URL to
access the synapse server and HOMESERVER_DOMAIN to be set to the domain configured in
that server. If you are using the provided docker-compose.yml, the default will be fine.
Maintenance
To drop the database of your docker compose run:
docker compose -f assets/docker-compose.yml down --volumes