Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
empiredan committed Mar 8, 2024
1 parent db834d2 commit 753e11f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go-client/admin/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func timeoutConfig() Config {
}
}

func testAdmin_Timeout(t *testing.T, exec func(c *Client) error) {
func testAdmin_Timeout(t *testing.T, exec func(c Client) error) {
c := NewClient(timeoutConfig())
assert.Equal(t, context.DeadlineExceeded, exec(c))
}
Expand Down Expand Up @@ -92,7 +92,7 @@ func TestAdmin_Table(t *testing.T) {
}

func TestAdmin_ListTablesTimeout(t *testing.T) {
testAdmin_Timeout(t, func(c *Client) (err, error) {
testAdmin_Timeout(t, func(c Client) (err error) {
_, err := c.ListTables()
})
}
Expand Down Expand Up @@ -171,7 +171,7 @@ func TestAdmin_ListNodes(t *testing.T) {
assert.Equal(t, len(expectedReplicaServers), len(nodes))

actualReplicaServers := make([]int, len(nodes))
for _, node := range nodes {
for i, node := range nodes {
// Each node should be alive.
assert.Equal(t, admin.NodeStatus_NS_ALIVE, node.Status)
actualReplicaServers[i] = node.Address.GetAddress()
Expand All @@ -182,7 +182,7 @@ func TestAdmin_ListNodes(t *testing.T) {
}

func TestAdmin_ListNodesTimeout(t *testing.T) {
testAdmin_Timeout(t, func(c *Client) (err, error) {
testAdmin_Timeout(t, func(c Client) (err error) {
_, err := c.ListNodes()
})
}

0 comments on commit 753e11f

Please sign in to comment.