mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-07 21:26:45 +02:00
Pad: Only check getKeyRevisionNumber() at key revisions
Checking every revision is more of a unit test than a consistency check, and limiting checks to key revisions should improve performance considerably.
This commit is contained in:
parent
fa0d77c11d
commit
01ffa070ee
@ -678,7 +678,9 @@ class Pad {
|
||||
assert.equal(op.attribs, AttributeMap.fromString(op.attribs, pool).toString());
|
||||
}
|
||||
atext = Changeset.applyToAText(changeset, atext, pool);
|
||||
assert.deepEqual(await this.getInternalRevisionAText(r), atext);
|
||||
if (r === this.getKeyRevisionNumber(r)) {
|
||||
assert.deepEqual(await this._getKeyRevisionAText(r), atext);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
const pfx = `(pad ${this.id} revision ${r}) `;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user