Skip to content

Commit 3936210

Browse files
authored
fix(cypress): stabilize local cypress seed + F-elements-sc typing (#5068)
1 parent 6774936 commit 3936210

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

cypress/cypress/e2e/F-elements-sc-workflow.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ describe('Test creation and editing functionalities, validation, etc. for Single
185185
cy.get('[data-cy="save-new-question"]').should('be.disabled')
186186
cy.get(`[data-cy="insert-answer-feedback-${ix}"]`)
187187
.realClick()
188-
.type(feedback)
188+
.realType(feedback)
189189
cy.get(`[data-cy="insert-answer-feedback-${ix}"]`).contains(feedback)
190190
})
191191
cy.get('[data-cy="save-new-question"]').should('not.be.disabled')

docker-compose.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ services:
187187
POSTGRES_USER: klicker-prod
188188
POSTGRES_PASSWORD: klicker
189189
POSTGRES_DB: klicker-prod
190+
command:
191+
- 'postgres'
192+
# Auto-kill sessions stuck "idle in transaction" after 5 minutes.
193+
# Prevents cascading cypress failures when a run is interrupted mid-seed
194+
# and leaves a BEGIN transaction holding locks on klicker-prod.
195+
- '-c'
196+
- 'idle_in_transaction_session_timeout=300000'
190197
ports:
191198
- 5432:5432
192199
networks:
@@ -264,7 +271,11 @@ services:
264271
- './util/litellm/config.yaml:/app/config.yaml'
265272
command: ['--config', '/app/config.yaml', '--port', '4000']
266273
healthcheck:
267-
test: ['CMD', 'curl', '-f', 'http://localhost:4000/health/liveliness']
274+
test:
275+
- 'CMD'
276+
- 'python'
277+
- '-c'
278+
- "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:4000/health/liveliness').status == 200 else 1)"
268279
interval: 15s
269280
timeout: 5s
270281
retries: 5

0 commit comments

Comments
 (0)