Skip to content

Commit

Permalink
add disconnected validators test
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur committed Aug 28, 2024
1 parent 9e8f740 commit 1f0d2f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion snow/networking/handler/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,16 @@ func TestHealthCheckSubnet(t *testing.T) {
require.True(ok)
networkingMap, ok := detailsMap["networking"]
require.True(ok)
networkingDetails, ok := networkingMap.(map[string]float64)
networkingDetails, ok := networkingMap.(map[string]interface{})
require.True(ok)
percentConnected, ok := networkingDetails["percentConnected"]
require.True(ok)
require.Equal(expectedPercentConnected, percentConnected)
disconnectedValidators, ok := networkingDetails["disconnectedValidators"]
require.True(ok)
vdrSet, ok := disconnectedValidators.(set.Set[ids.NodeID])
require.True(ok)
require.Equal(vdrSet.Len(), testVdrCount-index-1)
}
})
}
Expand Down

0 comments on commit 1f0d2f7

Please sign in to comment.