Skip to content

Commit 9f4b14a

Browse files
committed
fix: tests
1 parent 4c26d05 commit 9f4b14a

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

tests/suites/tenant/constants.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ export const simpleQuery = 'SELECT 1;';
55
export const longTableSelect = 'SELECT * FROM `.sys/pg_class`';
66

77
// 400 is pretty enough
8-
export const longRunningQuery = `
9-
$sample = AsList(AsStruct(ListFromRange(1, 100000) AS value, CAST(1 AS Uint32) AS id));
8+
export const longRunningQuery = new Array(400).fill(simpleQuery).join('');
9+
export const longRunningStreamQuery = `$sample = AsList(AsStruct(ListFromRange(1, 100000) AS value1, ListFromRange(1, 1000) AS value2, CAST(1 AS Uint32) AS id));
1010
11-
SELECT value, id FROM as_table($sample) FLATTEN BY (value);`;
11+
SELECT value1, value2, id FROM as_table($sample) FLATTEN BY (value1);
12+
`;
13+
export const selectFromMyRowTableQuery = 'select * from `my_row_table`';
1214

1315
export const createTableQuery = `
1416
CREATE TABLE \`/local/ydb_row_table\` (

tests/suites/tenant/queryEditor/queryEditor.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import {getClipboardContent} from '../../../utils/clipboard';
55
import {tenantName} from '../../../utils/constants';
66
import {toggleExperiment} from '../../../utils/toggleExperiment';
77
import {NavigationTabs, TenantPage, VISIBILITY_TIMEOUT} from '../TenantPage';
8-
import {createTableQuery, longRunningQuery, longTableSelect} from '../constants';
8+
import {
9+
createTableQuery,
10+
longRunningQuery,
11+
longRunningStreamQuery,
12+
longTableSelect,
13+
} from '../constants';
914

1015
import {
1116
ButtonNames,
@@ -107,10 +112,7 @@ test.describe('Test Query Editor', async () => {
107112
const queryEditor = new QueryEditor(page);
108113
await toggleExperiment(page, 'on', 'Query Streaming');
109114

110-
await queryEditor.clickGearButton();
111-
await queryEditor.settingsDialog.changeLimitRows(100000);
112-
await queryEditor.settingsDialog.clickButton(ButtonNames.Save);
113-
await queryEditor.setQuery(longRunningQuery);
115+
await queryEditor.setQuery(longRunningStreamQuery);
114116
await queryEditor.clickRunButton();
115117

116118
await expect(queryEditor.waitForStatus('Completed')).resolves.toBe(true);

0 commit comments

Comments
 (0)