Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeslieKid committed Aug 27, 2024
1 parent 1c146c9 commit f91e49c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion horaemeta/server/cluster/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 3 additions & 4 deletions horaemeta/server/cluster/metadata/cluster_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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) {
Expand Down

0 comments on commit f91e49c

Please sign in to comment.