(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestBatchErrorWithErrors(t *testing.T) { |
| 43 | var batch BatchError |
| 44 | batch.Add(errors.New(err1)) |
| 45 | batch.Add(errors.New(err2)) |
| 46 | assert.NotNil(t, batch.Err()) |
| 47 | assert.Equal(t, fmt.Sprintf("%s\n%s", err1, err2), batch.Err().Error()) |
| 48 | assert.True(t, batch.NotNil()) |
| 49 | } |
| 50 | |
| 51 | func TestBatchErrorConcurrentAdd(t *testing.T) { |
| 52 | const count = 10000 |