mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Review comments
This commit is contained in:
parent
7380273293
commit
c1b0f0b93b
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@ -2,6 +2,7 @@ name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
|
@ -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{
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user