Fix test cases by adding missing newlines and improving timeout handling

This commit is contained in:
Cédric Verstraeten
2026-08-10 12:52:37 +00:00
parent db135acea9
commit b2f029117e
2 changed files with 4 additions and 3 deletions

View File

@@ -206,4 +206,4 @@ func TestWriteAudioToBackchannelCancellationStopsReconnect(t *testing.T) {
case <-time.After(250 * time.Millisecond):
t.Fatal("cancellation did not interrupt reconnect backoff")
}
}
}

View File

@@ -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")
}
}
}