imbajin commented on code in PR #3102:
URL: https://github.com/apache/hugegraph/pull/3102#discussion_r3629829201


##########
hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh:
##########
@@ -58,18 +58,60 @@ function download_to_dir() {
 
 cd "$REPO_ROOT"
 
-VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
+ROCKSDB_ONLY=false
+
+if [[ "$BACKEND" == "rocksdb" &&
+      "$(uname -s)" == "Linux" &&
+      "$(uname -m)" == "riscv64" ]]; then
+    . "$TRAVIS_DIR/../static/bin/util.sh"
+    configure_riscv64_libatomic
+    ROCKSDB_ONLY=true
+fi
+
+if [[ "$ROCKSDB_ONLY" == "true" ]]; then
+    VERSION=$(mvn help:evaluate -Dexpression=project.version -q \
+                  -DforceStdout -Drocksdb-only)
+else
+    VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
+fi
 SERVER_DIR=hugegraph-server/apache-hugegraph-server-$VERSION/
 CONF=$SERVER_DIR/conf/graphs/hugegraph.properties
 REST_SERVER_CONF=$SERVER_DIR/conf/rest-server.properties
 GREMLIN_SERVER_CONF=$SERVER_DIR/conf/gremlin-server.yaml
 JACOCO_PORT=36320
+SERVER_START_ATTEMPTED=false
+
+function cleanup() {
+    local status=$?
+    trap - EXIT
+
+    if [[ "$SERVER_START_ATTEMPTED" == "true" ]]; then
+        if ! "$TRAVIS_DIR"/stop-server.sh "$SERVER_DIR"; then

Review Comment:
   ⚠️ **Important: propagate shutdown failures into this cleanup check**
   
   This check cannot currently detect a shutdown timeout. `stop-server.sh` 
delegates to `stop-hugegraph.sh`, whose last command is an `if 
kill_process_and_wait ...; then rm ...; fi`; when that condition is false, Bash 
returns status 0 for the `if` because there is no `else`. The cleanup can 
therefore report success while the server and stale PID file remain. Please 
make `stop-hugegraph.sh` explicitly return nonzero when `kill_process_and_wait` 
fails, and remove the PID file only on success, so this new EXIT cleanup can 
enforce the result it checks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to