Explorar o código

fix: ci timing of lnd test (#1513)

tsk hai 2 semanas
pai
achega
8623d95742
Modificáronse 1 ficheiros con 12 adicións e 4 borrados
  1. 12 4
      misc/mintd_payment_processor.sh

+ 12 - 4
misc/mintd_payment_processor.sh

@@ -94,14 +94,22 @@ if [ "$LN_BACKEND" != "FAKEWALLET" ]; then
                 ;;
         esac
     done < "$CDK_ITESTS_DIR/progress_pipe") &
-    # Wait for up to 120 seconds
-    for ((i=0; i<120; i++)); do
+    # Wait for up to 300 seconds (5 minutes) for regtest setup
+    # This needs to be long enough for cargo to compile start_regtest binary
+    for ((i=0; i<300; i++)); do
         if [ -f "$CDK_ITESTS_DIR/signal_received" ]; then
-            echo "break signal received"
+            echo "Checkpoint signal received"
             break
         fi
         sleep 1
     done
+
+    # Check if we actually received the signal or timed out
+    if [ ! -f "$CDK_ITESTS_DIR/signal_received" ]; then
+        echo "Timeout waiting for regtest setup after 300 seconds"
+        exit 1
+    fi
+
     echo "Regtest set up continuing"
     export CDK_PAYMENT_PROCESSOR_CLN_BOLT12=true
 fi
@@ -126,7 +134,7 @@ echo "$CDK_PAYMENT_PROCESSOR_CLN_RPC_PATH"
 # Wait for LND certificate and macaroon files to exist (only if using LND backend)
 if [ "$LN_BACKEND" = "LND" ]; then
     echo "Waiting for LND certificate and macaroon files..."
-    CERT_TIMEOUT=60
+    CERT_TIMEOUT=120
     CERT_START_TIME=$(date +%s)
     
     while [ ! -f "$CDK_PAYMENT_PROCESSOR_LND_CERT_FILE" ] || [ ! -f "$CDK_PAYMENT_PROCESSOR_LND_MACAROON_FILE" ]; do