Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomyno committed Sep 11, 2023
1 parent d4e30ac commit 9b6cec1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export JS_PLANETSCALE_DATABASE_URL="mysql://USER:[email protected]/DATABASE?sslaccept=strict"
export JS_NEON_DATABASE_URL="postgres://USER:[email protected]/neondb?pgbouncer=true&connect_timeout=10"

# Note: if you use hosted Postgres instances (e.g., from PDP provision), you need `?pgbouncer=true&sslmode=disable`
# Note: if you use hosted Postgres instances (e.g., from PDP provision), you need `?sslmode=disable`
export JS_PG_DATABASE_URL="postgres://postgres:prisma@localhost:5438"
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ export async function smokeTestClient(driverAdapter: DriverAdapter) {
assert.deepEqual(queries, defaultExpectedQueries)
}
} else if (['postgres'].includes(provider)) {
if (isUsingDriverAdapters) {
assert.deepEqual(queries, defaultExpectedQueries)
} else {
assert.deepEqual(queries, postgresExpectedQueries)
}
// Note: the "DEALLOCATE ALL" query is only present after "BEGIN" when using Rust Postgres with pgbouncer.
assert.deepEqual(queries.at(0), defaultExpectedQueries.at(0))
assert.deepEqual(queries.slice(-4), defaultExpectedQueries.slice(-4))
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { smokeTestLibquery } from './libquery'
describe('pg', () => {
const connectionString = `${process.env.JS_PG_DATABASE_URL as string}`

const neonConnection = new pg.Pool({ connectionString })
const adapter = new PrismaPg(neonConnection)
const pool = new pg.Pool({ connectionString })
const adapter = new PrismaPg(pool)
const driverAdapter = bindAdapter(adapter)

smokeTestLibquery(driverAdapter, '../../prisma/postgres/schema.prisma')
Expand Down

0 comments on commit 9b6cec1

Please sign in to comment.