Commit fe6dd0c6 authored by pengjun's avatar pengjun Committed by vipwzw

fix dpos testcase err

parent 665daccd
......@@ -489,7 +489,7 @@ func TestNode(t *testing.T) {
fmt.Println(cs1.(*Client).GetConsensusState() != nil)
fmt.Println(cs1.(*Client).GetConsensusState().String())
fmt.Println(len(cs1.(*Client).GetConsensusState().GetValidators()) == 1)
// fix data race --- 写只会在共识初始化,正常运行不会有datarace
// fix dpos testcase err --- 写只会在共识初始化,正常运行不会有datarace
//cs1.(*Client).GetConsensusState().SetPrivValidator(cs1.(*Client).GetConsensusState().GetPrivValidator(), cs1.(*Client).GetConsensusState().privValidatorIndex)
fmt.Println(cs1.(*Client).GetConsensusState().GetValidatorMgr().ChainID)
fmt.Println(cs1.(*Client).GetConsensusState().GetPrivValidator().GetAddress() != nil)
......
......@@ -32,7 +32,7 @@ func TestWriteFile(t *testing.T) {
fmt.Println(file.Mode())
assert.True(t, file.Name() == "tmp_priv_validator.json")
// fix unit test --- 在不同的操作系统写出来的文件权限不同,但不会影响共识,这里去掉文件权限校验
// fix dpos testcase err --- 在不同的操作系统写出来的文件权限不同,但不会影响共识,这里去掉文件权限校验
//assert.True(t, file.Mode() == 0664)
remove(filename)
......@@ -52,7 +52,8 @@ func TestWriteFileAtomic(t *testing.T) {
fmt.Println(file.Mode())
assert.True(t, file.Name() == "tmp_priv_validator.json")
assert.True(t, file.Mode() == 0664)
// fix dpos testcase err --- 在不同的操作系统写出来的文件权限不同,但不会影响共识,这里去掉文件权限校验
// assert.True(t, file.Mode() == 0664)
remove(filename)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment