mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
test: ensure consistency of TestSpooler_awaitError (#3750)
This commit is contained in:
parent
233d80502d
commit
ace94917da
@ -224,12 +224,17 @@ func TestSpooler_awaitError(t *testing.T) {
|
||||
s := &spooledHandler{
|
||||
Handler: tt.fields.currentHandler,
|
||||
}
|
||||
c := make(chan interface{})
|
||||
errs := make(chan error)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
go s.awaitError(cancel, errs, "test")
|
||||
go func() {
|
||||
s.awaitError(cancel, errs, "test")
|
||||
c <- nil
|
||||
}()
|
||||
errs <- tt.fields.err
|
||||
|
||||
<-c
|
||||
if ctx.Err() == nil {
|
||||
t.Error("cancel function was not called")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user