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
9919f229
Commit
9919f229
authored
Dec 18, 2021
by
Brad Davidson
Committed by
Brad Davidson
Dec 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add variable to enforce max test concurrency
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
247298a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
Dockerfile.test.dapper
Dockerfile.test.dapper
+1
-1
test-helpers
scripts/test-helpers
+27
-3
No files found.
Dockerfile.test.dapper
View file @
9919f229
ARG GOLANG=golang:1.16.10-alpine3.13
FROM ${GOLANG}
RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python3 openssl py3-pip
RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python3 openssl py3-pip
procps
ENV SONOBUOY_VERSION 0.55.0
...
...
scripts/test-helpers
View file @
9919f229
...
...
@@ -492,12 +492,12 @@ provision-cluster() {
done
fi
[
-f
"
$PROVISION_LOCK
"
]
&&
rm
$PROVISION_LOCK
timeout
--foreground
2m bash
-c
"wait-for-nodes
$((
NUM_SERVERS
+
NUM_AGENTS
))
"
timeout
--foreground
4m bash
-c
"wait-for-services
$WAIT_SERVICES
"
run-function cluster-post-hook
[
-f
"
$PROVISION_LOCK
"
]
&&
rm
$PROVISION_LOCK
}
export
-f
provision-cluster
...
...
@@ -556,21 +556,45 @@ export -f early-exit
# ---
run-test
()
{
local
delay
=
15
(
set
+x
while
[
$(
count-running-tests
)
-ge
${
MAX_CONCURRENT_TESTS
:-
4
}
]
;
do
sleep
$delay
done
)
export
PROVISION_LOCK
=
$(
mktemp
)
./scripts/test-runner
$@
&
pids+
=(
$!
)
(
set
+x
# busy-wait on the provisioning lock before imposing a final inter-test delay
while
[
-f
"
$PROVISION_LOCK
"
]
;
do
sleep
1
done
sleep
5
sleep
$delay
)
}
export
-f
run-test
# ---
count-running-tests
(){
local
count
=
0
for
pid
in
${
pids
[@]
}
;
do
if
[
$(
pgrep
-c
-P
$pid
)
-gt
0
]
;
then
((
count++
))
fi
done
echo
"Currently running
${
count
}
tests"
1>&2
echo
${
count
}
}
export
-f
count-running-tests
# ---
e2e-test
()
{
local
label
=
$label
if
[
-n
"
$LABEL_SUFFIX
"
]
;
then
...
...
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