Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Jul 12, 2023
1 parent 7380273 commit c1b0f0b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Tests

on:
push:
branches: ["main"]
pull_request:

permissions:
Expand Down
5 changes: 1 addition & 4 deletions sync2/handler2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{
Expand Down
7 changes: 4 additions & 3 deletions sync2/handler2/handler_test.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sync3/handler/connstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1b0f0b

Please sign in to comment.