mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 02:16:16 -04:00
tests: Speed up helper.edit()
and helper.clearPad()
This commit is contained in:
parent
7a154b1e1d
commit
7cbb3f565d
3 changed files with 33 additions and 6 deletions
|
@ -44,6 +44,7 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
let channelState = 'CONNECTING';
|
||||
let lastCommitTime = 0;
|
||||
let initialStartConnectTime = 0;
|
||||
let commitDelay = 500;
|
||||
|
||||
const userId = initialUserInfo.userId;
|
||||
// var socket;
|
||||
|
@ -102,7 +103,7 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
return;
|
||||
}
|
||||
|
||||
const earliestCommit = lastCommitTime + 500;
|
||||
const earliestCommit = lastCommitTime + commitDelay;
|
||||
if (now < earliestCommit) {
|
||||
setTimeout(handleUserChanges, earliestCommit - now);
|
||||
return;
|
||||
|
@ -488,6 +489,8 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
setChannelState,
|
||||
setStateIdle,
|
||||
setIsPendingRevision,
|
||||
set commitDelay(ms) { commitDelay = ms; },
|
||||
get commitDelay() { return commitDelay; },
|
||||
};
|
||||
|
||||
tellAceAboutHistoricalAuthors(serverVars.historicalAuthorData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue