Speed up itest runs
Wait only the number of seconds until the next minute, plus 5 for buffer
This commit is contained in:
parent
fb333d4546
commit
50045e71c8
@ -17,16 +17,18 @@ function main() {
|
|||||||
echo "start" > ./exec_result.txt
|
echo "start" > ./exec_result.txt
|
||||||
|
|
||||||
# Clean old containers
|
# Clean old containers
|
||||||
docker-compose down || true
|
docker compose down || true
|
||||||
# Start containers
|
# Start containers
|
||||||
echo "Starting containers"
|
echo "Starting containers"
|
||||||
docker-compose up -d --build
|
docker compose up -d --build
|
||||||
echo "Containers started. Sleeping for 70s to let schedules run"
|
|
||||||
# Schedules run on the shortest interval of a minute. This should allow time
|
# Schedules run on the shortest interval of a minute. This should allow time
|
||||||
# for the containers to start and execute once
|
# for the containers to start and execute once
|
||||||
sleep 70
|
local seconds=$((65 - $(date +"%S")))
|
||||||
|
echo "Containers started. Sleeping for ${seconds}s to let schedules run"
|
||||||
|
sleep $seconds
|
||||||
|
|
||||||
echo "Stopping containers"
|
echo "Stopping containers"
|
||||||
docker-compose stop
|
docker compose stop
|
||||||
|
|
||||||
# Validate result shows minimum amount of executions
|
# Validate result shows minimum amount of executions
|
||||||
check_results ./start_result.txt 2
|
check_results ./start_result.txt 2
|
||||||
|
Loading…
Reference in New Issue
Block a user