@@ -751,6 +751,11 @@ test_delete_endpoint() {
751751 # Extract just the ID portion for the delete endpoint
752752 local obj_id=$( echo " $test_id " | sed ' s|.*/||' )
753753
754+ # Skip if obj_id is invalid
755+ if [ -z " $obj_id " ] || [ " $obj_id " == " null" ]; then
756+ continue
757+ fi
758+
754759 # Measure ONLY the delete operation
755760 local result=$( measure_endpoint " ${API_BASE} /api/delete/${obj_id} " " DELETE" " " " Delete object" true 60)
756761 local time=$( echo " $result " | cut -d' |' -f1)
@@ -801,6 +806,11 @@ test_delete_endpoint() {
801806 # Extract just the ID portion for the delete endpoint
802807 local obj_id=$( echo " $test_id " | sed ' s|.*/||' )
803808
809+ # Skip if obj_id is invalid
810+ if [ -z " $obj_id " ] || [ " $obj_id " == " null" ]; then
811+ continue
812+ fi
813+
804814 # Measure ONLY the delete operation
805815 local result=$( measure_endpoint " ${API_BASE} /api/delete/${obj_id} " " DELETE" " " " Delete object" true 60)
806816 local time=$( echo " $result " | cut -d' |' -f1)
@@ -2165,6 +2175,12 @@ test_delete_endpoint_empty() {
21652175 local total=0 success=0
21662176 for i in $( seq 0 $(( NUM_ITERATIONS - 1 )) ) ; do
21672177 local obj_id=$( echo " ${CREATED_IDS[$i]} " | sed ' s|.*/||' )
2178+
2179+ # Skip if obj_id is invalid
2180+ if [ -z " $obj_id " ] || [ " $obj_id " == " null" ]; then
2181+ continue
2182+ fi
2183+
21682184 local result=$( measure_endpoint " ${API_BASE} /api/delete/${obj_id} " " DELETE" " " " Delete" true 60)
21692185 local time=$( echo " $result " | cut -d' |' -f1)
21702186 [ " $( echo " $result " | cut -d' |' -f2) " == " 204" ] && { total=$(( total + time)) ; success=$(( success + 1 )) ; }
@@ -2199,6 +2215,12 @@ test_delete_endpoint_full() {
21992215 for i in $( seq $start_idx $(( start_idx + NUM_ITERATIONS - 1 )) ) ; do
22002216 iteration=$(( iteration + 1 ))
22012217 local obj_id=$( echo " ${CREATED_IDS[$i]} " | sed ' s|.*/||' )
2218+
2219+ # Skip if obj_id is invalid
2220+ if [ -z " $obj_id " ] || [ " $obj_id " == " null" ]; then
2221+ continue
2222+ fi
2223+
22022224 local result=$( measure_endpoint " ${API_BASE} /api/delete/${obj_id} " " DELETE" " " " Delete" true 60)
22032225 local time=$( echo " $result " | cut -d' |' -f1)
22042226 [ " $( echo " $result " | cut -d' |' -f2) " == " 204" ] && { total=$(( total + time)) ; success=$(( success + 1 )) ; }
0 commit comments