Skip to content

Commit

Permalink
revert test change
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Aug 9, 2024
1 parent de94004 commit 850913a
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,31 @@ func (r *Runner) checkUpdate(t *testing.T, egressID string, status livekit.Egres
}

func (r *Runner) checkStreamUpdate(t *testing.T, egressID string, expected map[string]livekit.StreamInfo_Status) {
info := r.getUpdate(t, egressID)
require.Equal(t, len(expected), len(info.StreamResults))

for _, s := range info.StreamResults {
require.Equal(t, s.Status == livekit.StreamInfo_FAILED, s.Error != "")
for {
info := r.getUpdate(t, egressID)
require.Equal(t, len(expected), len(info.StreamResults))

failureStillActive := false
for _, s := range info.StreamResults {
require.Equal(t, s.Status == livekit.StreamInfo_FAILED, s.Error != "")

var e livekit.StreamInfo_Status
if strings.HasSuffix(s.Url, ".contribute.live-video.net/app/{f...1}") {
e = expected[badRtmpUrl1Redacted]
} else {
e = expected[s.Url]
}
if e == livekit.StreamInfo_FAILED && s.Status == livekit.StreamInfo_ACTIVE {
failureStillActive = true
continue
}

var e livekit.StreamInfo_Status
if strings.HasSuffix(s.Url, ".contribute.live-video.net/app/{f...1}") {
e = expected[badRtmpUrl1Redacted]
} else {
e = expected[s.Url]
require.Equal(t, e, s.Status)
}

require.Equal(t, e, s.Status)
if !failureStillActive {
return
}
}
}

Expand Down

0 comments on commit 850913a

Please sign in to comment.