Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace if by case
  • Loading branch information
mrodm committed Jul 24, 2025
commit dd33aee74e92d71d9593ab569c9c575289e9b352
24 changes: 13 additions & 11 deletions scripts/test-check-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ export ELASTIC_PACKAGE_LINKS_FILE_PATH
export SERVERLESS=${SERVERLESS:-"false"}

run_system_benchmark() {
local package_name=$1
local package_path=$2
local package_name="$1"
local package_path="$2"
echo "--- Run system benchmarks for package ${package_name}"
elastic-package benchmark system -C "$package_path" --benchmark logs-benchmark -v --defer-cleanup 1s
}

run_serverless_tests() {
local package_path=$1
local package_path="$1"
echo "--- Run tests for package ${package_path} in Serverless mode"
local test_options="-v --report-format xUnit --report-output file --defer-cleanup 1s"
local coverage_options="--test-coverage --coverage-format=generic"
Expand All @@ -73,8 +73,8 @@ run_serverless_tests() {
}

run_pipeline_benchmark() {
local package_name=$1
local package_path=$2
local package_name="$1"
local package_path="$2"
echo "--- Run pipeline benchmarks and report for package ${package_name}"
local test_options="-v --report-format xUnit --report-output file --fail-on-missing"

Expand Down Expand Up @@ -141,12 +141,14 @@ for d in test/packages/${PACKAGE_TEST_TYPE:-other}/${PACKAGE_UNDER_TEST:-*}/; do

if [ "${PACKAGE_TEST_TYPE:-other}" == "benchmarks" ]; then
# FIXME: There are other packages in test/packages/benchmarks folder that are not tested like rally_benchmark
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rally_benchmark package is located in test/packages/benchmarks folder but it is not tested at all.
I don't know if this could be tested as it is here. IIUC according to the docs it is required also esrally tool.


if [[ "${package_to_test}" == "pipeline_benchmark" || "${package_to_test}" == "use_pipeline_tests" ]]; then
run_pipeline_benchmark "${package_to_test}" "$d"
elif [ "${package_to_test}" == "system_benchmark" ]; then
run_system_benchmark "${package_to_test}" "$d"
fi
case "${package_to_test}" in
pipeline_benchmark|use_pipeline_tests)
run_pipeline_benchmark "${package_to_test}" "$d"
;;
Comment on lines +167 to +169
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until now just pipeline_benchmark package was tested, other packages under test/packages/benchmarks/ folder were not tested. One of them is use_pipeline_tests package.

The difference that I see between pipeline_benchmark and use_pipeline_tests is that:

  • pipeline_benchmark has the benchmark configuration for the data stream at data_stream/test/_dev/benchmark/pipeline/*.
  • use_pipeline_tests no benchmark configuration.

Tested locally with use_pipeline_tests package and it does not fail running the pipeline benchmarks and it creates a benchmark report successfully.

I think it can be added here, WDYT ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, yes.

system_benchmark)
run_system_benchmark "${package_to_test}" "$d"
;;
esac
continue
fi

Expand Down