Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
张蕾
Geth-Modification
Commits
1f397468
Commit
1f397468
authored
Dec 30, 2015
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/downloader: throttling tests are time-sensitive, don't run parallel
parent
dbbcf558
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
downloader_test.go
eth/downloader/downloader_test.go
+1
-3
No files found.
eth/downloader/downloader_test.go
View file @
1f397468
...
@@ -720,8 +720,6 @@ func TestThrottling64Full(t *testing.T) { testThrottling(t, 64, FullSync) }
...
@@ -720,8 +720,6 @@ func TestThrottling64Full(t *testing.T) { testThrottling(t, 64, FullSync) }
func
TestThrottling64Fast
(
t
*
testing
.
T
)
{
testThrottling
(
t
,
64
,
FastSync
)
}
func
TestThrottling64Fast
(
t
*
testing
.
T
)
{
testThrottling
(
t
,
64
,
FastSync
)
}
func
testThrottling
(
t
*
testing
.
T
,
protocol
int
,
mode
SyncMode
)
{
func
testThrottling
(
t
*
testing
.
T
,
protocol
int
,
mode
SyncMode
)
{
t
.
Parallel
()
// Create a long block chain to download and the tester
// Create a long block chain to download and the tester
targetBlocks
:=
8
*
blockCacheLimit
targetBlocks
:=
8
*
blockCacheLimit
hashes
,
headers
,
blocks
,
receipts
:=
makeChain
(
targetBlocks
,
0
,
genesis
,
nil
)
hashes
,
headers
,
blocks
,
receipts
:=
makeChain
(
targetBlocks
,
0
,
genesis
,
nil
)
...
@@ -751,7 +749,7 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) {
...
@@ -751,7 +749,7 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) {
}
}
// Wait a bit for sync to throttle itself
// Wait a bit for sync to throttle itself
var
cached
,
frozen
int
var
cached
,
frozen
int
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
time
.
Second
;
{
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
3
*
time
.
Second
;
{
time
.
Sleep
(
25
*
time
.
Millisecond
)
time
.
Sleep
(
25
*
time
.
Millisecond
)
tester
.
lock
.
Lock
()
tester
.
lock
.
Lock
()
...
...
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