Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/restricted_rooms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package tests

import (
"testing"
"time"

"github.com/tidwall/gjson"

Expand Down Expand Up @@ -325,6 +326,7 @@ func doTestRestrictedRoomsRemoteJoinLocalUser(t *testing.T, roomVersion string,
})
charlie.MustLeaveRoom(t, room)

time.Sleep(time.Second)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this should be necessary (and it seems strange to hardcode to 1 second), because MustSyncUntil will repeat the /sync several times until the condition becomes true.

// Ensure the events have synced to hs1.
alice.MustSyncUntil(t, client.SyncReq{}, client.SyncTimelineHas(
Copy link
Copy Markdown
Contributor Author

@chrislearn chrislearn Oct 18, 2025

Choose a reason for hiding this comment

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

This is alice sync first time, if charlie leave event is not sync to alice's local server, Charelie join member event will be in timeline events list?

I notice Dendrite skipped this test, I am not sure why.
synapse can pass this test, Charelie join event is not exists in timeline events when alice sync first time. seems synapse marked Charelie join event as outlier on alice local server.

Copy link
Copy Markdown
Collaborator

@MadLittleMods MadLittleMods Oct 20, 2025

Choose a reason for hiding this comment

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

I think you may be on the right track that there is some smoke here. We need to update this to keep checking for the Charlie membership to be leave. Currently, it checks until any Charlie membership exists.

The better fix here is to use client.SyncLeftFrom(...) instead of client.SyncTimelineHas(...) for this kind of thing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I created a PR to fix up more flawed membership checks in #813

room,
Expand Down
Loading