Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Dec 5, 2024
1 parent e6af97b commit 1c09d45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const CONFIG = {
? parseInt(process.env.POSTGRES_PORT, 10)
: 54320,
maxClient: 1,
idleTimeoutMillis: 30000,
idleTimeoutMillis: 10000,
};

const DEFAULT_PGPOOL_ATTRIBUTES = {
Expand Down Expand Up @@ -125,7 +125,7 @@ describe('pg-pool', () => {
const testPostgresLocally = process.env.RUN_POSTGRES_TESTS_LOCAL; // For local: spins up local postgres db via docker
const shouldTest = testPostgres || testPostgresLocally; // Skips these tests if false (default)

before(function (done) {
before(function () {
const skip = () => {
// this.skip() workaround
// https://github.com/mochajs/mocha/issues/2683#issuecomment-375629901
Expand All @@ -150,7 +150,6 @@ describe('pg-pool', () => {

const pgPool = require('pg-pool');
pool = new pgPool(CONFIG);
setTimeout(done, 3000);
});

after(done => {
Expand Down
4 changes: 0 additions & 4 deletions plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,10 @@ describe('pg', () => {
postgres = require('pg');
client = new postgres.Client(CONFIG);

await new Promise<void>(resolve => setTimeout(resolve, 3000));

await client.connect();
});

after(async () => {
await new Promise<void>(resolve => setTimeout(resolve, 3000));

if (testPostgresLocally) {
testUtils.cleanUpDocker('postgres');
}
Expand Down

0 comments on commit 1c09d45

Please sign in to comment.