Skip to content

Commit 087d3d0

Browse files
committed
solana: Update script to kill rpc and faucet ports
1 parent 05d8ce5 commit 087d3d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

solana/run-tests

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -euo pipefail
44

5+
RPC_PORT_NUMBER=8899
6+
FAUCET_PORT_NUMBER=9900
7+
58
# Run each tests/*.test.ts file separately to avoid account state persisting between tests
69
for file in `ls tests/*.test.ts`
710
do
@@ -14,4 +17,6 @@ do
1417

1518
# kill solana validator if still running to avoid port already in use error
1619
if pgrep solana-test-validator; then pkill solana-test-validator; fi
20+
lsof -i tcp:${RPC_PORT_NUMBER} | awk 'NR!=1 {print $2}' | xargs kill
21+
lsof -i tcp:${FAUCET_PORT_NUMBER} | awk 'NR!=1 {print $2}' | xargs kill
1722
done

0 commit comments

Comments
 (0)