Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8510fc67
Commit
8510fc67
authored
Apr 10, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6669 from yifan-gu/more_random
integration: Randomize the order of the integration tests.
parents
4f3f1951
d696ecdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
integration.go
cmd/integration/integration.go
+18
-18
No files found.
cmd/integration/integration.go
View file @
8510fc67
...
...
@@ -999,25 +999,25 @@ func main() {
}
// Only run at most maxConcurrency tests in parallel.
numFinishedTests
:=
0
for
numFinishedTests
<
len
(
testFuncs
)
{
numTestsToRun
:=
len
(
testFuncs
)
-
numFinishedTests
if
maxConcurrency
>
0
&&
numTestsToRun
>
maxConcurrency
{
numTestsToRun
=
maxConcurrency
}
glog
.
Infof
(
"Running %d tests in parallel."
,
numTestsToRun
)
var
wg
sync
.
WaitGroup
wg
.
Add
(
numTestsToRun
)
for
i
:=
0
;
i
<
numTestsToRun
;
i
++
{
f
:=
testFuncs
[
i
+
numFinishedTests
]
go
func
()
{
f
(
kubeClient
)
wg
.
Done
()
}()
}
wg
.
Wait
()
numFinishedTests
+=
numTestsToRun
if
maxConcurrency
<=
0
{
maxConcurrency
=
len
(
testFuncs
)
}
glog
.
Infof
(
"Running %d tests in parallel."
,
maxConcurrency
)
ch
:=
make
(
chan
struct
{},
maxConcurrency
)
var
wg
sync
.
WaitGroup
wg
.
Add
(
len
(
testFuncs
))
for
i
:=
range
testFuncs
{
f
:=
testFuncs
[
i
]
go
func
()
{
ch
<-
struct
{}{}
f
(
kubeClient
)
<-
ch
wg
.
Done
()
}()
}
wg
.
Wait
()
close
(
ch
)
// Check that kubelet tried to make the containers.
// Using a set to list unique creation attempts. Our fake is
...
...
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