mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Port allocation fix in TestServer
Summary: - Fixing port allocation in TestServer - Extending logging in the Billing test - Fixing negative rowIds support for add/remove actions - Making FormulaEditor and CardView tests less flacky Test Plan: Existing Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz, dsagal Differential Revision: https://phab.getgrist.com/D4280
This commit is contained in:
parent
c0ce791e28
commit
05214d8f9a
@ -395,7 +395,7 @@ class UserActions(object):
|
|||||||
|
|
||||||
# Whenever we add new rows, remember the mapping from any negative row_ids to their final
|
# Whenever we add new rows, remember the mapping from any negative row_ids to their final
|
||||||
# values. This allows the negative_row_ids to be used as Reference values in subsequent
|
# values. This allows the negative_row_ids to be used as Reference values in subsequent
|
||||||
# actions in the same bundle.
|
# actions in the same bundle, and in UpdateRecord/RemoveRecord actions.
|
||||||
self._engine.out_actions.summary.update_new_rows_map(table_id, row_ids, filled_row_ids)
|
self._engine.out_actions.summary.update_new_rows_map(table_id, row_ids, filled_row_ids)
|
||||||
|
|
||||||
# Convert entered values to the correct types.
|
# Convert entered values to the correct types.
|
||||||
@ -446,6 +446,9 @@ class UserActions(object):
|
|||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
|
|
||||||
def doBulkUpdateRecord(self, table_id, row_ids, columns):
|
def doBulkUpdateRecord(self, table_id, row_ids, columns):
|
||||||
|
# Replace negative ids that may refer to rows just added to this table in this bundle.
|
||||||
|
row_ids = self._engine.out_actions.summary.translate_new_row_ids(table_id, row_ids)
|
||||||
|
|
||||||
# Convert passed-in values to the column's correct types (or alttext, or errors) and trim any
|
# Convert passed-in values to the column's correct types (or alttext, or errors) and trim any
|
||||||
# unchanged values.
|
# unchanged values.
|
||||||
action, extra_actions = self._engine.convert_action_values(
|
action, extra_actions = self._engine.convert_action_values(
|
||||||
@ -1071,6 +1074,9 @@ class UserActions(object):
|
|||||||
assert all(isinstance(r, (int, table.Record)) for r in row_ids_or_records)
|
assert all(isinstance(r, (int, table.Record)) for r in row_ids_or_records)
|
||||||
row_ids = [int(r) for r in row_ids_or_records]
|
row_ids = [int(r) for r in row_ids_or_records]
|
||||||
|
|
||||||
|
# Replace negative ids that may refer to rows just added to this table in this bundle.
|
||||||
|
row_ids = self._engine.out_actions.summary.translate_new_row_ids(table_id, row_ids)
|
||||||
|
|
||||||
self._do_doc_action(actions.BulkRemoveRecord(table_id, row_ids))
|
self._do_doc_action(actions.BulkRemoveRecord(table_id, row_ids))
|
||||||
|
|
||||||
# Also remove any references to this row from other tables.
|
# Also remove any references to this row from other tables.
|
||||||
|
@ -79,7 +79,7 @@ export class TestServer {
|
|||||||
throw new Error(`Path of testingSocket too long: ${this.testingSocket.length} (${this.testingSocket})`);
|
throw new Error(`Path of testingSocket too long: ${this.testingSocket.length} (${this.testingSocket})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = await getAvailablePort();
|
const port = await getAvailablePort(Number(process.env.GET_AVAILABLE_PORT_START || '8000'));
|
||||||
this._serverUrl = `http://localhost:${port}`;
|
this._serverUrl = `http://localhost:${port}`;
|
||||||
const homeUrl = _homeUrl ?? (this._serverTypes.includes('home') ? this._serverUrl : undefined);
|
const homeUrl = _homeUrl ?? (this._serverTypes.includes('home') ? this._serverUrl : undefined);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user