Use ParticipantInfo version to ensure consistency (#399)
* Use ParticipantInfo version to ensure consistency Deprecating time.Time and avoid locking unnecessarily * properly adjust ulimit. update protocol * Save initial version from params * get rid of metadata field, use grants copy * fix test
This commit is contained in:
@@ -172,18 +172,17 @@ func TestOutOfOrderUpdates(t *testing.T) {
|
||||
Sid: "PA_test2",
|
||||
Identity: "test2",
|
||||
Metadata: "123",
|
||||
Version: 2,
|
||||
}
|
||||
earlierTs := time.Now()
|
||||
time.Sleep(time.Millisecond)
|
||||
laterTs := time.Now()
|
||||
require.NoError(t, p.SendParticipantUpdate([]*livekit.ParticipantInfo{pi}, laterTs))
|
||||
require.NoError(t, p.SendParticipantUpdate([]*livekit.ParticipantInfo{pi}))
|
||||
|
||||
pi = &livekit.ParticipantInfo{
|
||||
Sid: "PA_test2",
|
||||
Identity: "test2",
|
||||
Metadata: "456",
|
||||
Version: 1,
|
||||
}
|
||||
require.NoError(t, p.SendParticipantUpdate([]*livekit.ParticipantInfo{pi}, earlierTs))
|
||||
require.NoError(t, p.SendParticipantUpdate([]*livekit.ParticipantInfo{pi}))
|
||||
|
||||
// only sent once, and it's the earlier message
|
||||
require.Equal(t, 1, sink.WriteMessageCallCount())
|
||||
|
||||
Reference in New Issue
Block a user