Skip to content

Commit

Permalink
Test modifications based on the implementation approach
Browse files Browse the repository at this point in the history
  • Loading branch information
JOOHOJANG committed Oct 1, 2024
1 parent e3b438e commit 6f14089
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/sdk/test/integration/gc_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ describe('Garbage Collection', function () {
);
assert.equal(doc1.getGarbageLen(), 1);
await client1.sync();
assert.equal(doc1.getGarbageLen(), 0);
assert.equal(
versionVectorHelper(doc1.getVersionVector(), [
{ actor: client1.getID()!, lamport: Long.fromNumber(3) },
Expand Down Expand Up @@ -786,7 +787,7 @@ describe('Garbage Collection', function () {
]),
true,
);
assert.equal(doc1.getGarbageLen(), 4);
assert.equal(doc1.getGarbageLen(), 3);
await client1.sync();
assert.equal(
versionVectorHelper(doc1.getVersionVector(), [
Expand All @@ -795,7 +796,7 @@ describe('Garbage Collection', function () {
]),
true,
);
assert.equal(doc1.getGarbageLen(), 4);
assert.equal(doc1.getGarbageLen(), 3);

await client1.sync();
assert.equal(
Expand All @@ -805,7 +806,7 @@ describe('Garbage Collection', function () {
]),
true,
);
assert.equal(doc1.getGarbageLen(), 4);
assert.equal(doc1.getGarbageLen(), 3);

await client2.sync();
assert.equal(
Expand All @@ -815,7 +816,7 @@ describe('Garbage Collection', function () {
]),
true,
);
assert.equal(doc1.getGarbageLen(), 4);
assert.equal(doc1.getGarbageLen(), 3);
await client1.sync();
assert.equal(
versionVectorHelper(doc1.getVersionVector(), [
Expand All @@ -829,6 +830,8 @@ describe('Garbage Collection', function () {
assert.equal(doc1.getGarbageLen(), 4);
await client1.sync();
assert.equal(doc1.getGarbageLen(), 0);
await client2.sync();
assert.equal(doc2.getGarbageLen(), 0);

await client1.deactivate();
await client2.deactivate();
Expand Down

0 comments on commit 6f14089

Please sign in to comment.