mirror of
https://github.com/kerberos-io/agent.git
synced 2026-08-23 15:08:32 +00:00
Fix test cases by adding missing newlines and improving timeout handling
This commit is contained in:
@@ -206,4 +206,4 @@ func TestWriteAudioToBackchannelCancellationStopsReconnect(t *testing.T) {
|
||||
case <-time.After(250 * time.Millisecond):
|
||||
t.Fatal("cancellation did not interrupt reconnect backoff")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package mqtt
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/kerberos-io/agent/machinery/src/models"
|
||||
)
|
||||
@@ -32,7 +33,7 @@ func TestEnqueueLatestAudioDoesNotBlockNilChannel(t *testing.T) {
|
||||
|
||||
select {
|
||||
case <-done:
|
||||
default:
|
||||
case <-time.After(100 * time.Millisecond):
|
||||
t.Fatal("enqueueLatestAudio() blocked on a nil channel")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user