Skip to content

TestRoomCreationReportsEventsToMyself tests unspecified behaviour #901

Description

@timedoutuk

// sytest: Setting state twice is idempotent
t.Run("Setting state twice is idempotent", func(t *testing.T) {
t.Parallel()
stateEvent := b.Event{
Type: "a.test.state.type",
StateKey: b.Ptr(""),
Content: map[string]interface{}{
"a_key": "a_value",
},
}
firstID := alice.SendEventSynced(t, roomID, stateEvent)
secondID := alice.SendEventSynced(t, roomID, stateEvent)
if firstID != secondID {
t.Fatalf("Both Event IDs from supposedly-idempotent state-setting differ, %s != %s", firstID, secondID)
}
})

This behaviour is not written anywhere in the specification and is technically incorrect behaviour considering there is no transaction ID for setting state (which removes the idempotency guarantee)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions