diff --git a/horaemeta/server/cluster/manager_test.go b/horaemeta/server/cluster/manager_test.go index f9cf46494c..f399ff0efe 100644 --- a/horaemeta/server/cluster/manager_test.go +++ b/horaemeta/server/cluster/manager_test.go @@ -184,7 +184,7 @@ func testFetchCompactionNode(ctx context.Context, re *require.Assertions, manage ) { node, err := manager.FetchCompactionNode(ctx, clusterName) re.NoError(err) - re.Equal(node, node3) + re.Equal(node.Endpoint, node3) } func testAllocSchemaID(ctx context.Context, re *require.Assertions, manager cluster.Manager, diff --git a/horaemeta/server/cluster/metadata/cluster_metadata_test.go b/horaemeta/server/cluster/metadata/cluster_metadata_test.go index 3655b9238b..67a7d3815d 100644 --- a/horaemeta/server/cluster/metadata/cluster_metadata_test.go +++ b/horaemeta/server/cluster/metadata/cluster_metadata_test.go @@ -224,9 +224,8 @@ func testShardOperation(ctx context.Context, re *require.Assertions, m *metadata func testCompactionNodeOperation(ctx context.Context, re *require.Assertions, m *metadata.ClusterMetadata) { // Fetch a compaction node, it will throw error because cluster does not register compaction node yet. - nodeName, err := m.FetchCompactionNode(ctx) + _, err := m.FetchCompactionNode(ctx) re.Error(err) - re.Equal("", nodeName) // Register a compaction node. newNodeName := "testCompactionNode" @@ -243,9 +242,9 @@ func testCompactionNodeOperation(ctx context.Context, re *require.Assertions, m re.NoError(err) // Fetch a compaction node, it will return the new registered node with no error. - nodeName, err = m.FetchCompactionNode(ctx) + nodeName, err := m.FetchCompactionNode(ctx) re.NoError(err) - re.Equal(newNodeName, nodeName) + re.Equal(newNodeName, nodeName.Endpoint) } func testMetadataOperation(ctx context.Context, re *require.Assertions, m *metadata.ClusterMetadata) {