@malloydata/db-postgres 0.0.97 → 0.0.98-dev231026204034

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.
@@ -78,30 +78,26 @@ describe('PostgresConnection', () => {
78
78
  it('caches table schema', async () => {
79
79
  await connection.fetchSchemaForTables({ 'test1': 'table1' }, {});
80
80
  expect(getTableSchema).toBeCalledTimes(1);
81
- await new Promise(resolve => setTimeout(resolve));
82
81
  await connection.fetchSchemaForTables({ 'test1': 'table1' }, {});
83
82
  expect(getTableSchema).toBeCalledTimes(1);
84
83
  });
85
84
  it('refreshes table schema', async () => {
86
85
  await connection.fetchSchemaForTables({ 'test2': 'table2' }, {});
87
86
  expect(getTableSchema).toBeCalledTimes(1);
88
- await new Promise(resolve => setTimeout(resolve));
89
- await connection.fetchSchemaForTables({ 'test2': 'table2' }, { refreshTimestamp: Date.now() });
87
+ await connection.fetchSchemaForTables({ 'test2': 'table2' }, { refreshTimestamp: Date.now() + 10 });
90
88
  expect(getTableSchema).toBeCalledTimes(2);
91
89
  });
92
90
  it('caches sql schema', async () => {
93
91
  await connection.fetchSchemaForSQLBlock(SQL_BLOCK_1, {});
94
92
  expect(getSQLBlockSchema).toBeCalledTimes(1);
95
- await new Promise(resolve => setTimeout(resolve));
96
93
  await connection.fetchSchemaForSQLBlock(SQL_BLOCK_1, {});
97
94
  expect(getSQLBlockSchema).toBeCalledTimes(1);
98
95
  });
99
96
  it('refreshes sql schema', async () => {
100
97
  await connection.fetchSchemaForSQLBlock(SQL_BLOCK_2, {});
101
98
  expect(getSQLBlockSchema).toBeCalledTimes(1);
102
- await new Promise(resolve => setTimeout(resolve));
103
99
  await connection.fetchSchemaForSQLBlock(SQL_BLOCK_2, {
104
- refreshTimestamp: Date.now(),
100
+ refreshTimestamp: Date.now() + 10,
105
101
  });
106
102
  expect(getSQLBlockSchema).toBeCalledTimes(2);
107
103
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/db-postgres",
3
- "version": "0.0.97",
3
+ "version": "0.0.98-dev231026204034",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,8 +22,8 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "dependencies": {
25
- "@malloydata/malloy": "^0.0.97",
26
- "@malloydata/malloy-interfaces": "^0.0.97",
25
+ "@malloydata/malloy": "^0.0.98-dev231026204034",
26
+ "@malloydata/malloy-interfaces": "^0.0.98-dev231026204034",
27
27
  "@types/pg": "^8.6.1",
28
28
  "pg": "^8.7.1",
29
29
  "pg-query-stream": "4.2.3"