Skip to content

Commit eb1ab16

Browse files
committed
tests: Try to fix benchmark tests with interrupts
Signed-off-by: Marcel Klehr <[email protected]>
1 parent ee16c55 commit eb1ab16

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/test/test.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6773,7 +6773,6 @@ describe('Floccus', function() {
67736773
tree2AfterFirstSync = null
67746774
console.log('Initial round ok')
67756775

6776-
RUN_INTERRUPTS = true
67776776
setInterrupt()
67786777

67796778
for (let j = 0; j < 4; j++) {
@@ -6815,10 +6814,8 @@ describe('Floccus', function() {
68156814
.filter(item => item.id !== tree2AfterFirstSync.id)
68166815
}
68176816

6818-
RUN_INTERRUPTS = false
68196817
await randomlyManipulateTreeWithDeletions(account1, folders1, bookmarks1, RANDOM_MANIPULATION_ITERATIONS)
68206818
await randomlyManipulateTreeWithDeletions(account2, folders2, bookmarks2, RANDOM_MANIPULATION_ITERATIONS)
6821-
RUN_INTERRUPTS = true
68226819

68236820
console.log(' acc1 &acc2: Moved items')
68246821

@@ -6851,11 +6848,15 @@ describe('Floccus', function() {
68516848
serverTreeAfterSync = null
68526849
console.log('first half ok')
68536850

6851+
RUN_INTERRUPTS = true
6852+
68546853
await syncAccountWithInterrupts(account2)
68556854

68566855
// Sync twice, because some removal-move mixes are hard to sort out consistently
68576856
await syncAccountWithInterrupts(account2)
68586857

6858+
RUN_INTERRUPTS = false
6859+
68596860
console.log('second round: account2 completed')
68606861

68616862
let serverTreeAfterSecondSync = await getAllBookmarks(account1)
@@ -6876,7 +6877,9 @@ describe('Floccus', function() {
68766877
console.log('second half ok')
68776878

68786879
console.log('final sync')
6880+
RUN_INTERRUPTS = true
68796881
await syncAccountWithInterrupts(account1)
6882+
RUN_INTERRUPTS = false
68806883
console.log('final sync completed')
68816884

68826885
let serverTreeAfterFinalSync = await getAllBookmarks(account1)
@@ -6902,7 +6905,9 @@ describe('Floccus', function() {
69026905
tree1AfterFinalSync = null
69036906

69046907
await account1.init()
6908+
RUN_INTERRUPTS = true
69056909
await syncAccountWithInterrupts(account1)
6910+
RUN_INTERRUPTS = false
69066911
console.log('final sync after init completed')
69076912

69086913
let serverTreeAfterInit = await getAllBookmarks(account1)

0 commit comments

Comments
 (0)