@@ -16,6 +16,7 @@ import {
16
16
} from '@aztec/circuits.js' ;
17
17
import { makeContentCommitment , makeGlobalVariables } from '@aztec/circuits.js/testing' ;
18
18
19
+ import { jest } from '@jest/globals' ;
19
20
import { mkdtemp , rm } from 'fs/promises' ;
20
21
import { tmpdir } from 'os' ;
21
22
import { join } from 'path' ;
@@ -26,6 +27,8 @@ import { type WorldStateStatusSummary } from './message.js';
26
27
import { NativeWorldStateService , WORLD_STATE_VERSION_FILE } from './native_world_state.js' ;
27
28
import { WorldStateVersion } from './world_state_version.js' ;
28
29
30
+ jest . setTimeout ( 60_000 ) ;
31
+
29
32
describe ( 'NativeWorldState' , ( ) => {
30
33
let dataDir : string ;
31
34
let rollupAddress : EthAddress ;
@@ -52,7 +55,7 @@ describe('NativeWorldState', () => {
52
55
53
56
await ws . handleL2BlockAndMessages ( block , messages ) ;
54
57
await ws . close ( ) ;
55
- } , 30_000 ) ;
58
+ } ) ;
56
59
57
60
it ( 'correctly restores committed state' , async ( ) => {
58
61
const ws = await NativeWorldStateService . new ( rollupAddress , dataDir , defaultDBMapSize ) ;
@@ -243,7 +246,7 @@ describe('NativeWorldState', () => {
243
246
244
247
const forkAtZero = await ws . fork ( 0 ) ;
245
248
await compareChains ( forkAtGenesis , forkAtZero ) ;
246
- } , 30_000 ) ;
249
+ } ) ;
247
250
} ) ;
248
251
249
252
describe ( 'Pending and Proven chain' , ( ) => {
@@ -278,7 +281,7 @@ describe('NativeWorldState', () => {
278
281
expect ( status . summary . finalisedBlockNumber ) . toBe ( 0n ) ;
279
282
}
280
283
}
281
- } , 30_000 ) ;
284
+ } ) ;
282
285
283
286
it ( 'Can finalise multiple blocks' , async ( ) => {
284
287
const fork = await ws . fork ( ) ;
@@ -297,7 +300,7 @@ describe('NativeWorldState', () => {
297
300
expect ( status . unfinalisedBlockNumber ) . toBe ( 16n ) ;
298
301
expect ( status . oldestHistoricalBlock ) . toBe ( 1n ) ;
299
302
expect ( status . finalisedBlockNumber ) . toBe ( 8n ) ;
300
- } , 30_000 ) ;
303
+ } ) ;
301
304
302
305
it ( 'Can prune historic blocks' , async ( ) => {
303
306
const fork = await ws . fork ( ) ;
@@ -348,7 +351,7 @@ describe('NativeWorldState', () => {
348
351
'Unable to remove historical block, block not found' ,
349
352
) ;
350
353
}
351
- } , 30_000 ) ;
354
+ } ) ;
352
355
353
356
it ( 'Can re-org' , async ( ) => {
354
357
const nonReorgState = await NativeWorldStateService . tmp ( ) ;
@@ -448,7 +451,7 @@ describe('NativeWorldState', () => {
448
451
}
449
452
450
453
await compareChains ( ws . getCommitted ( ) , nonReorgState . getCommitted ( ) ) ;
451
- } , 30_000 ) ;
454
+ } ) ;
452
455
453
456
it ( 'Forks are deleted during a re-org' , async ( ) => {
454
457
const fork = await ws . fork ( ) ;
@@ -480,7 +483,7 @@ describe('NativeWorldState', () => {
480
483
await expect ( blockForks [ i ] . getSiblingPath ( MerkleTreeId . NULLIFIER_TREE , 0n ) ) . rejects . toThrow ( 'Fork not found' ) ;
481
484
}
482
485
}
483
- } , 30_000 ) ;
486
+ } ) ;
484
487
} ) ;
485
488
486
489
describe ( 'status reporting' , ( ) => {
@@ -596,6 +599,6 @@ describe('NativeWorldState', () => {
596
599
expect ( statuses [ 0 ] . dbStats . publicDataTreeStats . mapSize ) . toBe ( mapSizeBytes ) ;
597
600
598
601
await ws . close ( ) ;
599
- } , 30_000 ) ;
602
+ } ) ;
600
603
} ) ;
601
604
} ) ;
0 commit comments