mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-21 13:03:09 -06:00
Add tracing test?
This commit is contained in:
parent
62061a7890
commit
f22ebda1f5
|
|
@ -20,7 +20,9 @@ type RoomserverInternalAPITrace struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *RoomserverInternalAPITrace) QueryLeftUsers(ctx context.Context, req *QueryLeftUsersRequest, res *QueryLeftUsersResponse) error {
|
func (t *RoomserverInternalAPITrace) QueryLeftUsers(ctx context.Context, req *QueryLeftUsersRequest, res *QueryLeftUsersResponse) error {
|
||||||
return t.Impl.QueryLeftUsers(ctx, req, res)
|
err := t.Impl.QueryLeftUsers(ctx, req, res)
|
||||||
|
util.GetLogger(ctx).WithError(err).Infof("QueryLeftUsers req=%+v res=%+v", js(req), js(res))
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *RoomserverInternalAPITrace) SetFederationAPI(fsAPI fsAPI.RoomserverFederationAPI, keyRing *gomatrixserverlib.KeyRing) {
|
func (t *RoomserverInternalAPITrace) SetFederationAPI(fsAPI fsAPI.RoomserverFederationAPI, keyRing *gomatrixserverlib.KeyRing) {
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@ func Test_QueryLeftUsers(t *testing.T) {
|
||||||
})
|
})
|
||||||
t.Run("Monolith", func(t *testing.T) {
|
t.Run("Monolith", func(t *testing.T) {
|
||||||
testCase(rsAPI)
|
testCase(rsAPI)
|
||||||
|
// also test tracing
|
||||||
|
traceAPI := &api.RoomserverInternalAPITrace{Impl: rsAPI}
|
||||||
|
testCase(traceAPI)
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue