diff --git a/tests/common/traceql_runner.sh b/tests/common/traceql_runner.sh index df7eb129e..052bee1a8 100755 --- a/tests/common/traceql_runner.sh +++ b/tests/common/traceql_runner.sh @@ -49,7 +49,7 @@ function process_yaml_file() { echo "Test FAILED: expected $expected_count got $num_of_traces" exit 1 else - echo "Test PASSED" + echo "Test PASSED: expected $expected_count got $num_of_traces" exit 0 fi } diff --git a/tests/e2e/cli-upgrade/chainsaw-test.yaml b/tests/e2e/cli-upgrade/chainsaw-test.yaml index 481afb7ee..3294987c5 100644 --- a/tests/e2e/cli-upgrade/chainsaw-test.yaml +++ b/tests/e2e/cli-upgrade/chainsaw-test.yaml @@ -112,26 +112,34 @@ spec: - name: Generate Traffic try: - script: - timeout: 60s + timeout: 300s content: | + # Make sure that odigos components are ready + sleep 20 + + # Apply the job + kubectl apply -f 05-generate-traffic.yaml + + # Wait for the job to complete + job_name=$(kubectl get -f 05-generate-traffic.yaml -o=jsonpath='{.metadata.name}') + kubectl wait --for=condition=complete job/$job_name + + # Delete the job + kubectl delete -f 05-generate-traffic.yaml + while true; do - # Apply the job - kubectl apply -f 05-generate-traffic.yaml - - # Wait for the job to complete - job_name=$(kubectl get -f 05-generate-traffic.yaml -o=jsonpath='{.metadata.name}') - kubectl wait --for=condition=complete job/$job_name - - # Delete the job - kubectl delete -f 05-generate-traffic.yaml - + # wait for traces to be available + sleep 8 + # Run the wait-for-trace script + echo "Running TraceQL test at $(date)" ../../common/traceql_runner.sh tracesql/wait-for-trace.yaml + if [ $? -eq 0 ]; then break else - sleep 3 ../../common/flush_traces.sh + sleep 5 fi done - name: Verify Trace - Context Propagation diff --git a/tests/e2e/helm-chart/chainsaw-test.yaml b/tests/e2e/helm-chart/chainsaw-test.yaml index 972977c85..60debdaae 100644 --- a/tests/e2e/helm-chart/chainsaw-test.yaml +++ b/tests/e2e/helm-chart/chainsaw-test.yaml @@ -135,37 +135,43 @@ spec: - name: Generate Traffic try: - script: - timeout: 60s + timeout: 300s content: | - while true; do - # Apply the job - kubectl apply -f 05-generate-traffic.yaml + # Apply the job + kubectl apply -f 05-generate-traffic.yaml - # Wait for the job to complete - job_name=$(kubectl get -f 05-generate-traffic.yaml -o=jsonpath='{.metadata.name}') - kubectl wait --for=condition=complete job/$job_name + # Wait for the job to complete + job_name=$(kubectl get -f 05-generate-traffic.yaml -o=jsonpath='{.metadata.name}') + kubectl wait --for=condition=complete job/$job_name - # Delete the job - kubectl delete -f 05-generate-traffic.yaml + # Delete the job + kubectl delete -f 05-generate-traffic.yaml + + while true; do + # wait for traces to be available + sleep 8 # Run the wait-for-trace script + echo "Running TraceQL test at $(date)" ../../common/traceql_runner.sh tracesql/wait-for-trace.yaml + if [ $? -eq 0 ]; then break else - sleep 3 ../../common/flush_traces.sh + sleep 5 fi done - name: Verify Trace - Context Propagation try: - script: + timeout: 30s content: | ../../common/traceql_runner.sh tracesql/context-propagation.yaml catch: - podLogs: name: odiglet - namespace: odigos-system + namespace: odigos-test-ns - name: Verify Trace - Resource Attributes try: - script: @@ -174,7 +180,7 @@ spec: catch: - podLogs: name: odiglet - namespace: odigos-system + namespace: odigos-test-ns - name: Verify Trace - Span Attributes try: - script: @@ -183,7 +189,7 @@ spec: catch: - podLogs: name: odiglet - namespace: odigos-system + namespace: odigos-test-ns - name: Start Odigos UI in background try: diff --git a/tests/e2e/multi-apps/chainsaw-test.yaml b/tests/e2e/multi-apps/chainsaw-test.yaml index 3b04edafd..324797ee5 100644 --- a/tests/e2e/multi-apps/chainsaw-test.yaml +++ b/tests/e2e/multi-apps/chainsaw-test.yaml @@ -98,31 +98,37 @@ spec: - name: Generate Traffic try: - script: - timeout: 60s + timeout: 300s content: | - while true; do - # Apply the job - kubectl apply -f 05-generate-traffic.yaml + # Apply the job + kubectl apply -f 05-generate-traffic.yaml - # Wait for the job to complete - job_name=$(kubectl get -f 05-generate-traffic.yaml -o=jsonpath='{.metadata.name}') - kubectl wait --for=condition=complete job/$job_name + # Wait for the job to complete + job_name=$(kubectl get -f 05-generate-traffic.yaml -o=jsonpath='{.metadata.name}') + kubectl wait --for=condition=complete job/$job_name - # Delete the job - kubectl delete -f 05-generate-traffic.yaml + # Delete the job + kubectl delete -f 05-generate-traffic.yaml + + while true; do + # wait for traces to be available + sleep 8 # Run the wait-for-trace script + echo "Running TraceQL test at $(date)" ../../common/traceql_runner.sh tracesql/wait-for-trace.yaml + if [ $? -eq 0 ]; then break else - sleep 3 ../../common/flush_traces.sh + sleep 5 fi done - name: Verify Trace - Context Propagation try: - script: + timeout: 30s content: | ../../common/traceql_runner.sh tracesql/context-propagation.yaml catch: diff --git a/tests/e2e/workload-lifecycle/chainsaw-test.yaml b/tests/e2e/workload-lifecycle/chainsaw-test.yaml index 027df8308..bba67aec9 100644 --- a/tests/e2e/workload-lifecycle/chainsaw-test.yaml +++ b/tests/e2e/workload-lifecycle/chainsaw-test.yaml @@ -9,7 +9,7 @@ spec: - name: Build and Load Test App Images try: - script: - timeout: 350s + timeout: 450s content: | docker build -t nodejs-unsupported-version:v0.0.1 -f services/nodejs-http-server/unsupported-version.Dockerfile services/nodejs-http-server kind load docker-image nodejs-unsupported-version:v0.0.1