Skip to content

Raise the external-editor behave timeouts to reduce CI flakiness - #1619

Open
DiegoDAF wants to merge 1 commit into
dbcli:mainfrom
DiegoDAF:upstream/deflake-editor-timeouts
Open

Raise the external-editor behave timeouts to reduce CI flakiness#1619
DiegoDAF wants to merge 1 commit into
dbcli:mainfrom
DiegoDAF:upstream/deflake-editor-timeouts

Conversation

@DiegoDAF

@DiegoDAF DiegoDAF commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

The edit sql in file with external editor scenario in
tests/features/iocommands.feature errors intermittently on CI. It is a timing
issue, not a real failure: expect_exact waits only 2 seconds for the ex-mode
banner (and 1 second per token when checking the resulting prompt), which is
not always enough on a loaded runner.

When it expires, behave reports the scenario as an error and fail-fast then
cancels the sibling matrix jobs, so a single slow wait looks like a systematic
breakage across Python versions.

Recent examples: it hit #1543 on 3.10, #1544 and #1609 on other versions (both
went green on a later run with no code change), and my own fork's CI on commits
that touch nothing near the editor code. @j-bennet asked about exactly this in
#1543.

Change

Raise the expect_exact timeouts in tests/features/steps/iocommands.py to 10
seconds (from 2s, 1s and 5s).

This does not slow down passing runs: pexpect returns as soon as the expected
text appears, so the timeout only bounds how long a failing wait blocks
before behave gives up.

Validation

behave features/iocommands.feature green locally (2 scenarios, 12 steps), and
the full behave suite green as well (15 features, 61 scenarios, 0 failed). The
scenario has been stable in my fork since the change.

Checklist

  • I've added this contribution to the changelog.rst.

Not a feature from my list in discussion #1603: this is one of the upstream bugs I ran into while maintaining the fork, listed in the status section at the bottom of that discussion.

The `edit sql in file with external editor` scenario intermittently errors on
CI: `expect_exact` waits only 2 seconds for the ex-mode banner (and 1 second
per token when checking the resulting prompt), which is not always enough on a
loaded runner. behave then reports the scenario as an error and fail-fast
cancels the sibling matrix jobs, which looks like a systematic breakage.

Raise the timeouts in tests/features/steps/iocommands.py to 10 seconds. This
does not slow down passing runs: pexpect returns as soon as the expected text
appears, so the timeout only bounds how long a failing wait blocks.
DiegoDAF added a commit to DiegoDAF/pgcli.daf that referenced this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant