mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-07 14:13:11 -06:00
Bugfix for test
This commit is contained in:
parent
870f990a8f
commit
b1069451c3
|
|
@ -38,6 +38,12 @@ func (d dummyDB) MaxStreamPositionForPresence(ctx context.Context) (types.Stream
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type dummyConsumer struct{}
|
||||||
|
|
||||||
|
func (d dummyConsumer) EmitPresence(ctx context.Context, userID string, presence types.Presence, statusMsg *string, ts int, fromSync bool) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func TestRequestPool_updatePresence(t *testing.T) {
|
func TestRequestPool_updatePresence(t *testing.T) {
|
||||||
type args struct {
|
type args struct {
|
||||||
presence string
|
presence string
|
||||||
|
|
@ -45,6 +51,7 @@ func TestRequestPool_updatePresence(t *testing.T) {
|
||||||
sleep time.Duration
|
sleep time.Duration
|
||||||
}
|
}
|
||||||
publisher := &dummyPublisher{}
|
publisher := &dummyPublisher{}
|
||||||
|
consumer := &dummyConsumer{}
|
||||||
syncMap := sync.Map{}
|
syncMap := sync.Map{}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
|
|
@ -101,6 +108,7 @@ func TestRequestPool_updatePresence(t *testing.T) {
|
||||||
rp := &RequestPool{
|
rp := &RequestPool{
|
||||||
presence: &syncMap,
|
presence: &syncMap,
|
||||||
producer: publisher,
|
producer: publisher,
|
||||||
|
consumer: consumer,
|
||||||
cfg: &config.SyncAPI{
|
cfg: &config.SyncAPI{
|
||||||
Matrix: &config.Global{
|
Matrix: &config.Global{
|
||||||
JetStream: config.JetStream{
|
JetStream: config.JetStream{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue