types: use mtx on PartSet.String()

This commit is contained in:
Ethan Buchman
2017-03-02 20:47:07 -05:00
parent 6456654307
commit 8ba79252c8
5 changed files with 20 additions and 15 deletions

View File

@ -66,17 +66,17 @@ func TestNetInfo(t *testing.T) {
// FIXME: This seems to trigger a race condition with client.Local
// go test -v -race . -run=DumpCons
// func TestDumpConsensusState(t *testing.T) {
// for i, c := range GetClients() {
// // FIXME: fix server so it doesn't panic on invalid input
// nc, ok := c.(client.NetworkClient)
// require.True(t, ok, "%d", i)
// cons, err := nc.DumpConsensusState()
// require.Nil(t, err, "%d: %+v", i, err)
// assert.NotEmpty(t, cons.RoundState)
// assert.Empty(t, cons.PeerRoundStates)
// }
// }
func TestDumpConsensusState(t *testing.T) {
for i, c := range GetClients() {
// FIXME: fix server so it doesn't panic on invalid input
nc, ok := c.(client.NetworkClient)
require.True(t, ok, "%d", i)
cons, err := nc.DumpConsensusState()
require.Nil(t, err, "%d: %+v", i, err)
assert.NotEmpty(t, cons.RoundState)
assert.Empty(t, cons.PeerRoundStates)
}
}
func TestGenesisAndValidators(t *testing.T) {
for i, c := range GetClients() {