Separate the window sentence from the wrapped error so a bad certificate file is not reported as a key mismatch.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -43,7 +43,10 @@ func loginLog(t *testing.T, callsign, key string, tg int, id uint16, codecs []st
|
||||
}
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
t.Cleanup(cancel)
|
||||
go func() { _ = st.Run(ctx) }()
|
||||
go func() {
|
||||
// Run's error is observed through State, which is the station seam.
|
||||
_ = st.Run(ctx)
|
||||
}()
|
||||
refl.accept(t)
|
||||
declineTo2(t, refl)
|
||||
challenge := make([]byte, 20)
|
||||
@@ -187,7 +190,10 @@ func TestRefusedConnectionRetriesUntilQuit(t *testing.T) {
|
||||
}
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
go func() { _ = st.Run(ctx) }()
|
||||
go func() {
|
||||
// Run's error is observed through State, which is the station seam.
|
||||
_ = st.Run(ctx)
|
||||
}()
|
||||
|
||||
if _, err := st.Wait(ctx, func(s station.State) bool { return s.Connection == "Disconnected" }); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -232,7 +238,10 @@ func TestReflectorErrorStopsRetries(t *testing.T) {
|
||||
}
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
go func() { _ = st.Run(ctx) }()
|
||||
go func() {
|
||||
// Run's error is observed through State, which is the station seam.
|
||||
_ = st.Run(ctx)
|
||||
}()
|
||||
refl.accept(t)
|
||||
refl.readFrame(t)
|
||||
refl.writeFrame(t, 13, appendStr(nil, msg))
|
||||
@@ -266,7 +275,10 @@ func TestMissingOpusStopsRetries(t *testing.T) {
|
||||
}
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
go func() { _ = st.Run(ctx) }()
|
||||
go func() {
|
||||
// Run's error is observed through State, which is the station seam.
|
||||
_ = st.Run(ctx)
|
||||
}()
|
||||
refl.accept(t)
|
||||
declineTo2(t, refl)
|
||||
challenge := make([]byte, 20)
|
||||
|
||||
Reference in New Issue
Block a user