File tree 2 files changed +1
-16
lines changed
2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export const GENERATE_TYPES_DETECT_ONE_TO_ONE_RELATIONSHIPS =
43
43
44
44
export const DEFAULT_POOL_CONFIG : PoolConfig = {
45
45
max : 1 ,
46
- query_timeout : PG_CONN_TIMEOUT_SECS * 1000 ,
46
+ connectionTimeoutMillis : PG_CONN_TIMEOUT_SECS * 1000 ,
47
47
ssl : PG_META_DB_SSL_ROOT_CERT ? { ca : PG_META_DB_SSL_ROOT_CERT } : undefined ,
48
48
}
49
49
Original file line number Diff line number Diff line change 1
1
import { expect , test } from 'vitest'
2
2
import { app } from './utils'
3
- import { DEFAULT_POOL_CONFIG } from '../../src/server/constants'
4
3
5
4
test ( 'query' , async ( ) => {
6
5
const res = await app . inject ( {
@@ -540,17 +539,3 @@ test('very big number', async () => {
540
539
]
541
540
` )
542
541
} )
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
- } )
You can’t perform that action at this time.
0 commit comments