Skip to content

test: workaround supertest ECONNRESET #1445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9142b44
remove irrelevant tests
Feb 4, 2025
f91031c
remove circleCI config
Feb 4, 2025
3df42a9
iterate 10x
Feb 4, 2025
a215870
move matrix
Feb 4, 2025
047d1e8
xy10
Feb 4, 2025
4a9b21b
use cte
Feb 4, 2025
4e74a70
Merge branch 'master' into 1373-matrix
Feb 27, 2025
3e6b44c
Revert CTE change
Feb 27, 2025
52e66ae
re-introduce failure
Feb 27, 2025
28b2a01
use testServiceFullTrx()
Feb 27, 2025
d091c66
Merge branch 'master' into 1373-matrix
Mar 4, 2025
5df55ba
Merge branch 'master' into 1373-matrix
Mar 12, 2025
6e846c3
whitespace
Mar 12, 2025
d6347a4
run all tests (remove .only())
Mar 12, 2025
49d36a9
Attempt fix
Mar 12, 2025
00677fe
remove standard test suite (it doesn't fail any more)
Mar 12, 2025
4ea206d
wip: workaround supertest ECONNRESET
Mar 13, 2025
042970f
ensure shutdown
Mar 13, 2025
edc89ce
lint
Mar 13, 2025
2c5509f
handle ERR_SERVER_NOT_RUNNING nicer
Mar 13, 2025
d2a8110
null expressServer after closing
Mar 13, 2025
6851348
done after null
Mar 13, 2025
3d35c84
renmae things to minimise changes
Mar 13, 2025
ac48d3f
revert test setup changes to show bug still occurs
Mar 13, 2025
677f09f
Revert "revert test setup changes to show bug still occurs"
Mar 13, 2025
2d31559
print open connections
Mar 14, 2025
2a7bb15
print connection count for every test
Mar 14, 2025
47e6855
Add file descriptor count
Mar 14, 2025
d737599
lint
Mar 14, 2025
a94a227
try enable debug
Mar 14, 2025
d9166b6
add event listenerst
Mar 14, 2025
2eabe5d
increase test timeout from 6 to 60 mins
Mar 14, 2025
e5e0059
log creation of event listeners
Mar 14, 2025
8d9f39b
log to stdout instead of stderr
Mar 14, 2025
3cfa114
comment out slow debug
Mar 14, 2025
66295a0
lint
Mar 14, 2025
997b815
Merge branch 'master' into econreset
Mar 18, 2025
147a44e
Add supertest patch
Mar 18, 2025
6f03e94
patch the supertest file!
Mar 18, 2025
c390137
try to capture more detail about supertest request
Mar 18, 2025
fbaf025
print request itself
Mar 18, 2025
44ae44f
koa -> express
Mar 19, 2025
1832dc5
add clientError listener
Mar 19, 2025
64122db
stb
Mar 19, 2025
d2a473f
try catching clientError in supertest
Mar 19, 2025
904fd4e
don't stb
Mar 19, 2025
bc8d9cc
Update patches
Mar 19, 2025
81bc188
revert test changes
Mar 19, 2025
f85fbd1
revcert makefile
Mar 19, 2025
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
25 changes: 0 additions & 25 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"no-else-return": "off",
"no-multiple-empty-lines": "off",
"no-nested-ternary": "off",
"no-only-tests/no-only-tests": [ "error", { "block": [ "describe", "it", "describeMigration" ] } ],
"no-only-tests/no-only-tests": "off",
"no-restricted-syntax": "off",
"no-underscore-dangle": "off",
"nonblock-statement-body-position": "off",
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/db-migrations.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/oidc-e2e.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/oidc-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:

jobs:
oidc-integration-test:
timeout-minutes: 6
strategy:
matrix:
x: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
y: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
timeout-minutes: 60
# TODO should we use the same container as circle & central?
runs-on: ubuntu-latest
services:
Expand All @@ -31,6 +35,8 @@ jobs:
node-version: 22.12.0
cache: 'npm'
- run: npm ci
- run: patch --strip=0 < supertest-1.patch
- run: patch --strip=0 < supertest-2.patch
- run: FAKE_OIDC_ROOT_URL=http://localhost:9898 make fake-oidc-server-ci > fake-oidc-server.log &
- run: node lib/bin/create-docker-databases.js
- run: make test-oidc-integration
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/s3-e2e.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/soak-test.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/standard-e2e.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/standard-suite.yml

This file was deleted.

17 changes: 9 additions & 8 deletions lib/model/query/blobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,17 @@ const _markAsUploaded = ({ id }) => ({ run }) => run(sql`
// Set s3_status to failed so that if the inner transaction rolls back, the
// the s3_status is committed as 'failed'.
const _getOnePending = () => ({ maybeOne }) => maybeOne(sql`
WITH pending AS (
SELECT id
FROM blobs
WHERE s3_status='pending'
LIMIT 1
FOR NO KEY UPDATE
SKIP LOCKED
)
UPDATE blobs
SET s3_status='failed'
WHERE id IN (
SELECT id
FROM blobs
WHERE s3_status='pending'
LIMIT 1
FOR NO KEY UPDATE
SKIP LOCKED
)
WHERE id IN (SELECT id FROM pending)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated

RETURNING *
`).then(map(construct(Blob)));

Expand Down
Loading