Skip to content

Commit 5566a34

Browse files
committed
Debug test
1 parent 3f6d94f commit 5566a34

1 file changed

Lines changed: 6 additions & 36 deletions

File tree

http-tests/admin/model/ontology-import-upload-no-deadlock.sh

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -83,45 +83,15 @@ echo "Cleared ontology cache to force reload"
8383

8484
# Step 5: Make a request that triggers ontology loading
8585
# This would cause a deadlock without the OntologyFilter fix
86-
# Use portable timeout implementation (works on both macOS and Linux)
8786

8887
echo "Making request to trigger ontology loading (testing for deadlock)..."
8988

90-
# Portable timeout function - works on both macOS and Linux
91-
request_pid=""
92-
(
93-
curl -k -f -s \
94-
-E "$OWNER_CERT_FILE":"$OWNER_CERT_PWD" \
95-
-H "Accept: application/n-triples" \
96-
"$namespace_doc" > /dev/null
97-
) &
98-
request_pid=$!
99-
100-
# Wait up to 30 seconds for the request to complete
101-
timeout_seconds=30
102-
elapsed=0
103-
while kill -0 "$request_pid" 2>/dev/null; do
104-
if [ $elapsed -ge $timeout_seconds ]; then
105-
kill -9 "$request_pid" 2>/dev/null || true
106-
echo "ERROR: Request timed out after ${timeout_seconds} seconds - deadlock detected!"
107-
exit 1
108-
fi
109-
sleep 1
110-
elapsed=$((elapsed + 1))
111-
done
112-
113-
# Check if curl succeeded
114-
set +e # Temporarily disable exit-on-error for wait
115-
wait "$request_pid"
116-
curl_exit_code=$?
117-
set -e # Re-enable exit-on-error
118-
119-
if [ $curl_exit_code -ne 0 ]; then
120-
echo "ERROR: Request failed with exit code $curl_exit_code"
121-
exit 1
122-
fi
123-
124-
echo "Request completed successfully in ${elapsed}s (no deadlock)"
89+
curl -k -f -s \
90+
-E "$OWNER_CERT_FILE":"$OWNER_CERT_PWD" \
91+
-H "Accept: application/n-triples" \
92+
"$namespace_doc" > /dev/null
93+
94+
echo "Request completed successfully (no deadlock)"
12595

12696
# Step 6: Verify the import is present in the loaded ontology
12797

0 commit comments

Comments
 (0)