Skip to content

Commit

Permalink
Format some of the bash scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrichwilken committed Dec 10, 2023
1 parent 21d9977 commit f21c612
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions e2e/scripts/natsbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ sleep 1
# This will will all the port-forwarding and delete the stream. We need this to be in a function so we can even call it,
# if our tests fails since `set -e` would stop the script in case of an failing test.
function cleanup() {
# Forcefully purge the stream.
nats stream purge benchstream -f
# Forcefully delete the stream.
nats stream rm benchstream -f
kill ${PID}
# Forcefully purge the stream.
nats stream purge benchstream -f
# Forcefully delete the stream.
nats stream rm benchstream -f

kill ${PID}
}

# This kills the port-forwards even if the test fails.
Expand Down
6 changes: 3 additions & 3 deletions e2e/scripts/natsserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ PID3=$!
# This will will all the port-forwarding. We need this to be in a function so we can even call it, if our tests fails
# since `set -e` would stop the script in case of an failing test.
function kill_port_forward() {
kill ${PID1}
kill ${PID2}
kill ${PID3}
kill ${PID1}
kill ${PID2}
kill ${PID3}
}
# This kills the port-forwards even if the test fails.
trap kill_port_forward ERR
Expand Down

0 comments on commit f21c612

Please sign in to comment.