Skip to content

Commit

Permalink
feat: add (simple) load test to tier2 testing
Browse files Browse the repository at this point in the history
Fixes #1086
  • Loading branch information
jhult committed Jul 15, 2024
1 parent 83b783a commit 894d5a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ tier1: tier1-prereqs check lint test-unit
rest_accounts_summary \
hurl

load:
@echo "--- Performing a simple load test'"
time ./ops/regression-test.rb "$TOPLEVEL"/result/bin/mina-indexer load

# Run the 2nd tier of tests.
tier2: tier2-prereqs test-unit-mina-rs nix-build && build-image
tier2: tier2-prereqs test-unit-mina-rs nix-build load && build-image
@echo "--- Performing regressions test(s) with Nix-built binary"
time ./ops/regression-test.rb "$TOPLEVEL"/result/bin/mina-indexer
@echo "--- Performing many_blocks regression test"
Expand Down
12 changes: 11 additions & 1 deletion tests/regression.bash
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,10 @@ test_block_children() {
assert '3NKqMEewA8gvEiW7So7nZ3DN6tPnmCtHpWuAzADN5ff9wiqkGf45' $(echo "$children" | jq -r .[3].state_hash)
}

test_load() {
test_hurl true
}

test_hurl() {
stage_mainnet_blocks 120 ./blocks

Expand All @@ -1449,7 +1453,12 @@ test_hurl() {
--web-hostname "0.0.0.0"
wait_for_socket

hurl --variable url=http://localhost:"$port"/graphql --test --parallel "$SRC"/tests/hurl/*.hurl
local parallel_flag=""
if [[ "${1:-}" == "true" ]]; then
parallel_flag="--parallel"
fi

hurl --variable url=http://localhost:"$port"/graphql --test $parallel_flag "$SRC"/tests/hurl/*.hurl
}

test_version_file() {
Expand Down Expand Up @@ -1592,6 +1601,7 @@ for test_name in "$@"; do
"test_version_file") test_version_file ;;
# Tier 2 tests:
"test_many_blocks") test_many_blocks ;;
"test_load") test_load ;;
"test_release") test_release ;;
*) echo "Unknown test: $test_name"
exit 1
Expand Down

0 comments on commit 894d5a6

Please sign in to comment.