Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/e2e/cli/attach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ $pm2 start stdin.js -o out-rel.log --merge-logs
# Send LINE\n to stdin application
$pm2 send 0 "LINE"

# Wait for log to be written with circuit breaker
max_attempts=5
attempt=0
while [ $attempt -lt $max_attempts ]; do
if grep -q "LINE" out-rel.log 2>/dev/null; then
break
fi
sleep 0.1
attempt=$((attempt + 1))
done

cat out-rel.log
grep "LINE" out-rel.log
spec "Should have reveived line"
Expand Down
Loading