diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0680cb9..7d8df5ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,7 @@ name: Tests on: push: + branches: ["main"] pull_request: permissions: diff --git a/sync2/handler2/handler.go b/sync2/handler2/handler.go index 506a4813..15d8037e 100644 --- a/sync2/handler2/handler.go +++ b/sync2/handler2/handler.go @@ -12,9 +12,6 @@ import ( "github.com/jmoiron/sqlx" "github.com/matrix-org/sliding-sync/sqlutil" - "github.com/jmoiron/sqlx" - "github.com/matrix-org/sliding-sync/sqlutil" - "github.com/getsentry/sentry-go" "github.com/matrix-org/sliding-sync/internal" @@ -55,7 +52,7 @@ type Handler struct { } func NewHandler( - pMap *sync2.PollerMap, v2Store *sync2.Storage, store *state.Storage, + pMap sync2.IPollerMap, v2Store *sync2.Storage, store *state.Storage, pub pubsub.Notifier, sub pubsub.Listener, enablePrometheus bool, deviceDataUpdateDuration time.Duration, ) (*Handler, error) { h := &Handler{ diff --git a/sync2/handler2/handler_test.go b/sync2/handler2/handler_test.go index 20f064ab..fa315228 100644 --- a/sync2/handler2/handler_test.go +++ b/sync2/handler2/handler_test.go @@ -1,14 +1,15 @@ package handler2_test import ( - "github.com/jmoiron/sqlx" - "github.com/matrix-org/sliding-sync/sqlutil" "os" "reflect" "sync" "testing" "time" + "github.com/jmoiron/sqlx" + "github.com/matrix-org/sliding-sync/sqlutil" + "github.com/matrix-org/sliding-sync/pubsub" "github.com/matrix-org/sliding-sync/state" "github.com/matrix-org/sliding-sync/sync2" @@ -127,7 +128,7 @@ func TestHandlerFreshEnsurePolling(t *testing.T) { pMap := &mockPollerMap{} pub := newMockPub() sub := &mockSub{} - h, err := handler2.NewHandler(pMap, v2Store, store, pub, sub, false) + h, err := handler2.NewHandler(pMap, v2Store, store, pub, sub, false, time.Minute) assertNoError(t, err) alice := "@alice:localhost" deviceID := "ALICE" diff --git a/sync3/handler/connstate.go b/sync3/handler/connstate.go index a0aae60b..9f3f79ab 100644 --- a/sync3/handler/connstate.go +++ b/sync3/handler/connstate.go @@ -197,7 +197,7 @@ func (s *ConnState) onIncomingRequest(reqCtx context.Context, req *sync3.Request internal.Logf(reqCtx, "connstate", "list[%v] prev_empty=%v curr=%v", key, l.Prev == nil, listData) } for roomID, sub := range s.muxedReq.RoomSubscriptions { - internal.Logf(ctx, "connstate", "room sub[%v] %v", roomID, sub) + internal.Logf(reqCtx, "connstate", "room sub[%v] %v", roomID, sub) } // work out which rooms we'll return data for and add their relevant subscriptions to the builder