Skip to content

Commit

Permalink
Increasing sleep times in test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
freol35241 committed Oct 12, 2023
1 parent 342c9d3 commit e9cc2d0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/10-test-base-setup.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load "./bats-helpers/bats-assert/load"
setup_file() {
docker pull hivemq/mqtt-cli:4.15.0
docker compose -f docker-compose.base.yml up -d
sleep 10
sleep 15
}

teardown_file() {
Expand Down Expand Up @@ -74,6 +74,8 @@ teardown_file() {
# Start a subscriber in the background and let it run for 10s
docker run --name subscriber --detach --network='host' hivemq/mqtt-cli:4.15.0 sub -v -h localhost -p 80 -ws -ws:path mqtt -t PONTOS_HUB/#

sleep 2

# Publish an actual payload that should be rewritten by the mqtt editor
run docker run --network='host' hivemq/mqtt-cli:4.15.0 pub -v -h localhost -p 80 -ws -ws:path mqtt -t PONTOS/test_vessel/test_parameter/1 -m '{"timestamp": 12345678, "value": 42}'
assert_line --partial 'received PUBLISH acknowledgement'
Expand Down
2 changes: 1 addition & 1 deletion tests/20-test-issue-jwt.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load "./bats-helpers/bats-assert/load"
setup_file() {
docker pull hivemq/mqtt-cli:4.15.0
docker compose -f docker-compose.base.yml -f docker-compose.auth.yml -f tests/docker-compose.auth-test.yml up -d --build
sleep 10
sleep 15
}

teardown_file() {
Expand Down
2 changes: 1 addition & 1 deletion tests/21-test-auth-setup.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load "./bats-helpers/bats-assert/load"
setup_file() {
docker pull hivemq/mqtt-cli:4.15.0
docker compose -f docker-compose.base.yml -f docker-compose.auth.yml up -d --build
sleep 10
sleep 15
}

teardown_file() {
Expand Down
2 changes: 1 addition & 1 deletion tests/22-test-setup-with-custom-acl-rules.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ teardown() {

# Start base setup
docker compose -f docker-compose.base.yml -f docker-compose.auth.yml up -d --build
sleep 10
sleep 15

# Lets generate a token by ourselves with subject 'test_user'
token=$(jwt encode --sub=test_user --secret="$PONTOS_JWT_SECRET")
Expand Down

0 comments on commit e9cc2d0

Please sign in to comment.