Check error in allocator test (#8621)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
sunby 2021-09-27 10:46:08 +08:00 committed by GitHub
parent e1d8ef83d2
commit d1dead500c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,9 +36,10 @@ func TestAllocator_Basic(t *testing.T) {
t.Run("Test Unhealthy Root", func(t *testing.T) {
ms := newMockRootCoordService()
allocator := newRootCoordAllocator(ms)
ms.Stop()
err := ms.Stop()
assert.Nil(t, err)
_, err := allocator.allocTimestamp(ctx)
_, err = allocator.allocTimestamp(ctx)
assert.Error(t, err)
_, err = allocator.allocID(ctx)
assert.Error(t, err)