Skip to content

Commit

Permalink
tests: fix: increase wait times to work with workflows (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
carneiro-cw authored Nov 1, 2024
1 parent cba32f2 commit 1bd06cd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
37 changes: 19 additions & 18 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -453,75 +453,76 @@ contracts-coverage-erase:
just _log "Erasing coverage info..."
rm -rf ./*/coverage && echo "Coverage info erased."

stratus-test-coverage:
stratus-test-coverage output="":
just contracts-clone

cargo llvm-cov clean --workspace
# inmemory
-CARGO_COMMAND="llvm-cov --no-report" just e2e-stratus automine
sleep 5
sleep 10

-CARGO_COMMAND="llvm-cov --no-report" just e2e-stratus external
sleep 5
sleep 10

-CARGO_COMMAND="llvm-cov --no-report" just e2e-clock-stratus
sleep 5
sleep 10

-CARGO_COMMAND="llvm-cov --no-report" just contracts-test-stratus
sleep 5

sleep 10

# rocksdb
-rm -r data/rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-stratus-rocks automine
sleep 5
sleep 10

-rm -r data/rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-stratus-rocks external
sleep 5
sleep 10

-rm -r data/rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-clock-stratus-rocks
sleep 5
sleep 10

-rm -r data/rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just contracts-test-stratus-rocks
sleep 5
sleep 10


# other
-CARGO_COMMAND="llvm-cov --no-report" cargo llvm-cov --no-report
sleep 5
sleep 10

-just contracts-clone --token
-just contracts-flatten --token
-rm -r temp_3000-rocksdb
-rm -r temp_3001-rocksdb
-docker compose down -v
-CARGO_COMMAND="llvm-cov --no-report" just e2e-leader-follower-up kafka " "
sleep 5
sleep 10

-rm -r temp_3000-rocksdb
-rm -r temp_3001-rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-leader-follower-up deploy " "
sleep 5
sleep 10

-rm -r temp_3000-rocksdb
-rm -r temp_3001-rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-leader-follower-up brlc " "
sleep 5
sleep 10

-rm -r temp_3000-rocksdb
-rm -r temp_3001-rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-leader-follower-up change " "
sleep 5
sleep 10

-rm -r temp_3000-rocksdb
-rm -r temp_3001-rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-leader-follower-up miner " "
sleep 5
sleep 10

-rm -r temp_3000-rocksdb
-rm -r temp_3001-rocksdb
-CARGO_COMMAND="llvm-cov --no-report" just e2e-leader-follower-up importer " "
sleep 5
sleep 10

cargo llvm-cov report
cargo llvm-cov report {{output}}
6 changes: 3 additions & 3 deletions justfile_helpers
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ _log message:
# Wait for Stratus to start.
_wait_for_stratus port="3000":
#!/bin/bash
just _log "Waiting 120 seconds for Stratus on port {{port}} to start"
wait-service --tcp 0.0.0.0:{{port}} -t 120 -- echo
just _log "Waiting 1500 seconds for Stratus on port {{port}} to start"
wait-service --tcp 0.0.0.0:{{port}} -t 1500 -- echo
if [ $? -eq 0 ]; then
just _log "Stratus on port {{port}} started"
else
just _log "Stratus on port {{port}} did not start fast enough"
cat stratus.log
exit 255
fi
fi

0 comments on commit 1bd06cd

Please sign in to comment.