Skip to content

Commit 4e486f0

Browse files
committed
add delay between create tables queries
1 parent 18071a4 commit 4e486f0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

packages/cubejs-testing-drivers/src/tests/testQueries.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type TestQueriesOptions = {
2525

2626
export const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
2727

28+
const OP_DELAY = 3000;
29+
2830
export function testQueries(type: string, { includeIncrementalSchemaSuite, extendedEnv, includeHLLSuite, externalSchemaTests }: TestQueriesOptions = {}): void {
2931
describe(`Queries with the @cubejs-backend/${type}-driver${extendedEnv ? ` ${extendedEnv}` : ''}`, () => {
3032
jest.setTimeout(60 * 7 * 1000);
@@ -129,6 +131,7 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
129131
try {
130132
for (const q of queries) {
131133
await driver.createTableRaw(q);
134+
await delay(OP_DELAY);
132135
}
133136
console.log(`Creating ${queries.length} fixture tables completed`);
134137
} catch (e: any) {
@@ -158,39 +161,39 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
158161
contexts: [{ securityContext: { tenant: 't1' } }],
159162
});
160163

161-
await delay(2000);
164+
await delay(OP_DELAY);
162165

163166
await buildPreaggs(env.cube.port, apiToken, {
164167
timezones: ['UTC'],
165168
preAggregations: ['ECommerce.SAExternal'],
166169
contexts: [{ securityContext: { tenant: 't1' } }],
167170
});
168171

169-
await delay(2000);
172+
await delay(OP_DELAY);
170173

171174
await buildPreaggs(env.cube.port, apiToken, {
172175
timezones: ['UTC'],
173176
preAggregations: ['ECommerce.TAExternal'],
174177
contexts: [{ securityContext: { tenant: 't1' } }],
175178
});
176179

177-
await delay(2000);
180+
await delay(OP_DELAY);
178181

179182
await buildPreaggs(env.cube.port, apiToken, {
180183
timezones: ['UTC'],
181184
preAggregations: ['BigECommerce.TAExternal'],
182185
contexts: [{ securityContext: { tenant: 't1' } }],
183186
});
184187

185-
await delay(2000);
188+
await delay(OP_DELAY);
186189

187190
await buildPreaggs(env.cube.port, apiToken, {
188191
timezones: ['UTC'],
189192
preAggregations: ['BigECommerce.MultiTimeDimForCountExternal'],
190193
contexts: [{ securityContext: { tenant: 't1' } }],
191194
});
192195

193-
await delay(2000);
196+
await delay(OP_DELAY);
194197

195198
if (includeHLLSuite) {
196199
await buildPreaggs(env.cube.port, apiToken, {
@@ -199,7 +202,7 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
199202
contexts: [{ securityContext: { tenant: 't1' } }],
200203
});
201204

202-
await delay(2000);
205+
await delay(OP_DELAY);
203206
}
204207
});
205208

0 commit comments

Comments
 (0)