瀏覽代碼

more robust discovery log check

Alex Cheema 7 月之前
父節點
當前提交
3c0297c3e9
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      .github/workflows/build_and_test.yml

+ 4 - 1
.github/workflows/build_and_test.yml

@@ -100,7 +100,10 @@ jobs:
           PID2=$!
           sleep 10
           kill $PID1 $PID2
-          if grep -q "Peer statuses: {\\'node2\\': \\'is_connected=True, health_check=True" output1.log && ! grep -q "Failed to connect peers:" output1.log && grep -q "Peer statuses: {\\'node1\\': \\'is_connected=True, health_check=True" output2.log && ! grep -q "Failed to connect peers:" output2.log; then
+          if grep -q "Peer statuses: {.*'node2': 'is_connected=True, health_check=True" output1.log && \
+             ! grep -q "Failed to connect peers:" output1.log && \
+             grep -q "Peer statuses: {.*'node1': 'is_connected=True, health_check=True" output2.log && \
+             ! grep -q "Failed to connect peers:" output2.log; then
             echo "Test passed: Both instances discovered each other"
             exit 0
           else