Begin adding syncapi component tests (#2442)

* Add very basic syncapi tests

* Add a way to inject jetstream messages

* implement add_state_ids

* bugfixes

* Unbreak tests

* Remove now un-needed API call

* Linting
This commit is contained in:
kegsay 2022-05-09 17:23:02 +01:00 committed by GitHub
parent a443d1e5f3
commit 236b16aa6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 337 additions and 11 deletions

View file

@ -65,11 +65,13 @@ func NewRequestPool(
userAPI userapi.SyncUserAPI, keyAPI keyapi.SyncKeyAPI,
rsAPI roomserverAPI.SyncRoomserverAPI,
streams *streams.Streams, notifier *notifier.Notifier,
producer PresencePublisher,
producer PresencePublisher, enableMetrics bool,
) *RequestPool {
prometheus.MustRegister(
activeSyncRequests, waitingSyncRequests,
)
if enableMetrics {
prometheus.MustRegister(
activeSyncRequests, waitingSyncRequests,
)
}
rp := &RequestPool{
db: db,
cfg: cfg,