mirror of
https://github.com/stablyai/orca.git
synced 2026-10-06 16:02:25 +00:00
test(linux): tolerate readiness timeout boundary
This commit is contained in:
@@ -60,6 +60,11 @@ ready_line=$(timeout "$startup_timeout_seconds" bash -c '
|
||||
| sed -u -n 's/^[^{]*//p' \
|
||||
| jq --unbuffered -Rnc '\''first(inputs | fromjson? | select(.type == "orca_server_ready" and .schemaVersion == 1))'\''
|
||||
' bash "$app_pid" "$stdout_log" || true)
|
||||
# A readiness event can land as the timeout tears down the tail pipeline.
|
||||
if [[ -z "$ready_line" ]]; then
|
||||
ready_line=$(sed -u -n 's/^[^{]*//p' "$stdout_log" \
|
||||
| jq --unbuffered -Rnc 'first(inputs | fromjson? | select(.type == "orca_server_ready" and .schemaVersion == 1))')
|
||||
fi
|
||||
if [[ -z "$ready_line" ]]; then
|
||||
cat "$stdout_log" "$stderr_log" >&2
|
||||
echo "FAIL: entrypoint exited or timed out before orca_server_ready" >&2
|
||||
|
||||
@@ -70,6 +70,10 @@ describe('headless serve shutdown PR gate', () => {
|
||||
|
||||
it('keeps the readiness parser line-buffered', () => {
|
||||
expect(signalCase).toContain("| sed -u -n 's/^[^{]*//p'")
|
||||
expect(signalCase).toContain(
|
||||
'A readiness event can land as the timeout tears down the tail pipeline.'
|
||||
)
|
||||
expect(signalCase).toContain('ready_line=$(sed -u -n')
|
||||
})
|
||||
|
||||
it('checks that a serving-electron signal target owns the ready socket', () => {
|
||||
|
||||
Reference in New Issue
Block a user