mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 10:28:52 +00:00
refactor: spooled handler (#752)
* refactor: spooled handler * fix(spooler): test locked channel
This commit is contained in:
@@ -293,15 +293,20 @@ func TestSpooler_lock(t *testing.T) {
|
||||
}
|
||||
|
||||
errs := make(chan error, 1)
|
||||
defer close(errs)
|
||||
ctx, _ := context.WithDeadline(context.Background(), tt.args.deadline)
|
||||
|
||||
locked := s.lock(ctx, errs, "test-worker")
|
||||
|
||||
if tt.fields.expectsErr {
|
||||
lock := <-locked
|
||||
err := <-errs
|
||||
if err == nil {
|
||||
t.Error("No error in error queue")
|
||||
}
|
||||
if lock {
|
||||
t.Error("lock should have failed")
|
||||
}
|
||||
} else {
|
||||
lock := <-locked
|
||||
if !lock {
|
||||
|
||||
Reference in New Issue
Block a user