Skip to content

Commit

Permalink
Add some logging to diagnose a flaky test
Browse files Browse the repository at this point in the history
Extra logging to help diagnose
matrix-org/synapse#13334
  • Loading branch information
richvdh committed Sep 21, 2022
1 parent bde29aa commit c66b465
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 c66b465

Please sign in to comment.