Skip to content

Commit f829a94

Browse files
committed
Remove test that does not pass on any known homeserver
1 parent fa693d3 commit f829a94

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

tests/csapi/txnid_test.go

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,56 +38,6 @@ func mustNotHaveTransactionID(t *testing.T, roomID, eventID string) client.SyncC
3838
})
3939
}
4040

41-
// TestTxnAfterRefresh tests that when a client refreshes its access token,
42-
// it still gets back a transaction ID in the sync response.
43-
func TestTxnAfterRefresh(t *testing.T) {
44-
// Dendrite and Conduit don't support refresh tokens yet.
45-
// The implementation in Synapse is broken: https://github.com/matrix-org/synapse/issues/15141
46-
// Whilst strange that this test is disabled for all homeservers, it remains so that we can confirm when
47-
// Synapse is fixed and could be used by any other homeserver developers in the meantime.
48-
runtime.SkipIf(t, runtime.Dendrite, runtime.Conduit, runtime.Synapse)
49-
50-
deployment := Deploy(t, b.BlueprintCleanHS)
51-
defer deployment.Destroy(t)
52-
53-
deployment.RegisterUser(t, "hs1", "alice", "password", false)
54-
55-
c := deployment.Client(t, "hs1", "")
56-
57-
var refreshToken string
58-
c.UserID, c.AccessToken, refreshToken, c.DeviceID, _ = c.LoginUserWithRefreshToken(t, "alice", "password")
59-
60-
// Create a room where we can send events.
61-
roomID := c.CreateRoom(t, map[string]interface{}{})
62-
63-
// Let's send an event, and wait for it to appear in the sync.
64-
eventID := c.SendEventUnsynced(t, roomID, b.Event{
65-
Type: "m.room.message",
66-
Content: map[string]interface{}{
67-
"msgtype": "m.text",
68-
"body": "first",
69-
},
70-
})
71-
72-
// When syncing, we should find the event and it should have a transaction ID.
73-
token := c.MustSyncUntil(t, client.SyncReq{}, mustHaveTransactionID(t, roomID, eventID))
74-
75-
// Now do the same, but refresh the token before syncing.
76-
eventID = c.SendEventUnsynced(t, roomID, b.Event{
77-
Type: "m.room.message",
78-
Content: map[string]interface{}{
79-
"msgtype": "m.text",
80-
"body": "second",
81-
},
82-
})
83-
84-
// Use the refresh token to get a new access token.
85-
c.AccessToken, refreshToken, _ = c.ConsumeRefreshToken(t, refreshToken)
86-
87-
// When syncing, we should find the event and it should also have a transaction ID.
88-
c.MustSyncUntil(t, client.SyncReq{Since: token}, mustHaveTransactionID(t, roomID, eventID))
89-
}
90-
9141
// TestTxnScopeOnLocalEcho tests that transaction IDs are scoped to the access token, not the device
9242
// on the sync response
9343
func TestTxnScopeOnLocalEcho(t *testing.T) {

0 commit comments

Comments
 (0)