Skip to content

Commit a473298

Browse files
authored
fix: Revert "fix: query timeout" (supabase#777)
This reverts commit e49ebcd.
1 parent 80bee30 commit a473298

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/server/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const GENERATE_TYPES_DETECT_ONE_TO_ONE_RELATIONSHIPS =
4343

4444
export const DEFAULT_POOL_CONFIG: PoolConfig = {
4545
max: 1,
46-
query_timeout: PG_CONN_TIMEOUT_SECS * 1000,
46+
connectionTimeoutMillis: PG_CONN_TIMEOUT_SECS * 1000,
4747
ssl: PG_META_DB_SSL_ROOT_CERT ? { ca: PG_META_DB_SSL_ROOT_CERT } : undefined,
4848
}
4949

test/server/query.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { expect, test } from 'vitest'
22
import { app } from './utils'
3-
import { DEFAULT_POOL_CONFIG } from '../../src/server/constants'
43

54
test('query', async () => {
65
const res = await app.inject({
@@ -540,17 +539,3 @@ test('very big number', async () => {
540539
]
541540
`)
542541
})
543-
544-
test('query timeout', async () => {
545-
const defaultTimeout = DEFAULT_POOL_CONFIG.query_timeout
546-
DEFAULT_POOL_CONFIG.query_timeout = 100
547-
548-
const res = await app.inject({
549-
method: 'POST',
550-
path: '/query',
551-
payload: { query: "select pg_sleep_for('1 minute');" },
552-
})
553-
expect(res.json()?.error).toMatchInlineSnapshot(`"Query read timeout"`)
554-
555-
DEFAULT_POOL_CONFIG.query_timeout = defaultTimeout
556-
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy