Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
fe6dd0c6
Commit
fe6dd0c6
authored
Jun 19, 2020
by
pengjun
Committed by
vipwzw
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dpos testcase err
parent
665daccd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
node_test.go
plugin/consensus/dpos/node_test.go
+1
-1
util_test.go
plugin/consensus/dpos/types/util_test.go
+3
-2
No files found.
plugin/consensus/dpos/node_test.go
View file @
fe6dd0c6
...
...
@@ -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 d
ata race
--- 写只会在共识初始化,正常运行不会有datarace
// fix d
pos 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
)
...
...
plugin/consensus/dpos/types/util_test.go
View file @
fe6dd0c6
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment