@dionlarson/playwright-orchestrator-pg 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,9 +127,12 @@ export class PostgreSQLAdapter extends Adapter {
127
127
  CREATE INDEX IF NOT EXISTS test_info_id_idx ON ${this.testInfoHistoryTable}(test_info_id);`);
128
128
  }
129
129
  async startShard(runId) {
130
+ console.log(`[pg-adapter] startShard: connecting to pool...`);
130
131
  const client = await this.pool.connect();
132
+ console.log(`[pg-adapter] startShard: connected, beginning transaction...`);
131
133
  try {
132
134
  await client.query('BEGIN');
135
+ console.log(`[pg-adapter] startShard: fetching run ${runId}...`);
133
136
  let result = await client.query({
134
137
  text: `
135
138
  SELECT *
@@ -138,6 +141,7 @@ export class PostgreSQLAdapter extends Adapter {
138
141
  FOR UPDATE`,
139
142
  values: [runId],
140
143
  });
144
+ console.log(`[pg-adapter] startShard: found ${result.rowCount} rows`);
141
145
  if (result.rowCount === 0) {
142
146
  throw new Error(`Run ${runId} not found`);
143
147
  }
@@ -165,9 +169,11 @@ export class PostgreSQLAdapter extends Adapter {
165
169
  });
166
170
  }
167
171
  await client.query('COMMIT');
172
+ console.log(`[pg-adapter] startShard: committed, returning config`);
168
173
  return this.mapConfig(result.rows[0]);
169
174
  }
170
175
  catch (e) {
176
+ console.log(`[pg-adapter] startShard: error, rolling back: ${e}`);
171
177
  await client.query('ROLLBACK');
172
178
  throw e;
173
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dionlarson/playwright-orchestrator-pg",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "keywords": [],
5
5
  "author": "Rostyslav Kudrevatykh",
6
6
  "license": "Apache-2.0",