Handle util funcutil returned error (#9170)

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
This commit is contained in:
godchen 2021-10-04 17:18:56 +08:00 committed by GitHub
parent 45d6b8dcd0
commit 3c98adfe41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,12 @@ func Test_ProcessFuncParallel(t *testing.T) {
return nil
}
ProcessFuncParallel(total, 1, randomErrorF, "randomErrorF") // serial
err = ProcessFuncParallel(total, 1, randomErrorF, "randomErrorF") // serial
assert.NotNil(t, err)
ProcessFuncParallel(total, total, randomErrorF, "randomErrorF") // Totally Parallel
err = ProcessFuncParallel(total, total, randomErrorF, "randomErrorF") // Totally Parallel
assert.NotNil(t, err)
ProcessFuncParallel(total, runtime.NumCPU(), randomErrorF, "randomErrorF") // Parallel by CPU
err = ProcessFuncParallel(total, runtime.NumCPU(), randomErrorF, "randomErrorF") // Parallel by CPU
assert.NotNil(t, err)
}