Skip to content

Commit

Permalink
Add some logging to diagnose a flaky test (#470)
Browse files Browse the repository at this point in the history
Extra logging to help diagnose
matrix-org/synapse#13334
  • Loading branch information
richvdh authored Sep 21, 2022
1 parent bde29aa commit aeea46c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/direct_messaging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"testing"
"time"

"github.com/matrix-org/complement/internal/b"
"github.com/matrix-org/complement/internal/client"
Expand All @@ -19,7 +20,11 @@ import (
// Requires a functioning account data implementation.
func TestWriteMDirectAccountData(t *testing.T) {
deployment := Deploy(t, b.BlueprintOneToOneRoom)
defer deployment.Destroy(t)
defer func() {
// additional logging to debug https://github.com/matrix-org/synapse/issues/13334
t.Logf("%s: TestWriteMDirectAccountData complete: destroying HS deployment", time.Now())
deployment.Destroy(t)
}()

alice := deployment.Client(t, "hs1", "@alice:hs1")
bob := deployment.Client(t, "hs1", "@bob:hs1")
Expand All @@ -46,6 +51,7 @@ func TestWriteMDirectAccountData(t *testing.T) {
}
return true
}
t.Logf("%s: global account data set; syncing until it arrives", time.Now()) // synapse#13334
since := alice.MustSyncUntil(t, client.SyncReq{}, client.SyncGlobalAccountDataHas(checkAccountData))
// now update the DM room and test that incremental syncing also pushes new account data
roomID = alice.CreateRoom(t, map[string]interface{}{
Expand Down

0 comments on commit aeea46c

Please sign in to comment.