Fix swallowed errors in TestRollbackManager_Join() (#3327)
This commit is contained in:
parent
71b5aa22e5
commit
8ccdaa1860
|
@ -81,11 +81,12 @@ func TestRollbackManager_Join(t *testing.T) {
|
|||
wg := &sync.WaitGroup{}
|
||||
wg.Add(3)
|
||||
|
||||
errCh := make(chan error, 3)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
err := m.Rollback("foo")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
errCh <- err
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -93,7 +94,7 @@ func TestRollbackManager_Join(t *testing.T) {
|
|||
defer wg.Done()
|
||||
err := m.Rollback("foo")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
errCh <- err
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -101,8 +102,13 @@ func TestRollbackManager_Join(t *testing.T) {
|
|||
defer wg.Done()
|
||||
err := m.Rollback("foo")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
errCh <- err
|
||||
}
|
||||
}()
|
||||
wg.Wait()
|
||||
close(errCh)
|
||||
err := <-errCh
|
||||
if err != nil {
|
||||
t.Fatalf("Error on rollback:%v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue