@@ -2,7 +2,7 @@ import { vol } from 'memfs';
22import { beforeEach , describe , expect , it } from 'vitest' ;
33import { MEMFS_VOLUME } from '@code-pushup/test-utils' ;
44import { getUniqueInstanceId } from './process-id.js' ;
5- import { SHARDED_WAL_COORDINATOR_ID_ENV_VAR } from './profiler/constants.js' ;
5+ import { PROFILER_SHARDER_ID_ENV_VAR } from './profiler/constants.js' ;
66import { ShardedWal } from './wal-sharded.js' ;
77import { WriteAheadLogFile , createTolerantCodec } from './wal.js' ;
88
@@ -17,7 +17,7 @@ const getShardedWal = (overrides?: {
1717 new ShardedWal ( {
1818 dir : '/test/shards' ,
1919 format : { baseName : 'test-wal' } ,
20- coordinatorIdEnvVar : SHARDED_WAL_COORDINATOR_ID_ENV_VAR ,
20+ coordinatorIdEnvVar : PROFILER_SHARDER_ID_ENV_VAR ,
2121 ...overrides ,
2222 } ) ;
2323
@@ -26,7 +26,7 @@ describe('ShardedWal', () => {
2626 vol . reset ( ) ;
2727 vol . fromJSON ( { } , MEMFS_VOLUME ) ;
2828 // Clear coordinator env var for fresh state
29- delete process . env [ SHARDED_WAL_COORDINATOR_ID_ENV_VAR ] ;
29+ delete process . env [ PROFILER_SHARDER_ID_ENV_VAR ] ;
3030 } ) ;
3131
3232 describe ( 'initialization' , ( ) => {
@@ -226,7 +226,7 @@ describe('ShardedWal', () => {
226226 } ) ;
227227
228228 // Ensure no coordinator is set
229- delete process . env [ SHARDED_WAL_COORDINATOR_ID_ENV_VAR ] ;
229+ delete process . env [ PROFILER_SHARDER_ID_ENV_VAR ] ;
230230
231231 const sw = getShardedWal ( {
232232 dir : '/shards' ,
@@ -246,7 +246,7 @@ describe('ShardedWal', () => {
246246 } ) ;
247247
248248 // Ensure no coordinator is set
249- delete process . env [ SHARDED_WAL_COORDINATOR_ID_ENV_VAR ] ;
249+ delete process . env [ PROFILER_SHARDER_ID_ENV_VAR ] ;
250250
251251 const sw = getShardedWal ( {
252252 dir : '/shards' ,
@@ -364,10 +364,7 @@ describe('ShardedWal', () => {
364364 } ) ;
365365
366366 // Set coordinator BEFORE creating instance
367- ShardedWal . setCoordinatorProcess (
368- SHARDED_WAL_COORDINATOR_ID_ENV_VAR ,
369- instanceId ,
370- ) ;
367+ ShardedWal . setCoordinatorProcess ( PROFILER_SHARDER_ID_ENV_VAR , instanceId ) ;
371368
372369 const sw = getShardedWal ( {
373370 dir : '/shards' ,
@@ -416,10 +413,7 @@ describe('ShardedWal', () => {
416413 } ) ;
417414
418415 // Set coordinator BEFORE creating instance
419- ShardedWal . setCoordinatorProcess (
420- SHARDED_WAL_COORDINATOR_ID_ENV_VAR ,
421- instanceId ,
422- ) ;
416+ ShardedWal . setCoordinatorProcess ( PROFILER_SHARDER_ID_ENV_VAR , instanceId ) ;
423417
424418 const sw = getShardedWal ( {
425419 dir : '/shards' ,
@@ -451,7 +445,7 @@ describe('ShardedWal', () => {
451445 } ) ;
452446
453447 // Not coordinator - cleanupIfCoordinator should be no-op
454- delete process . env [ SHARDED_WAL_COORDINATOR_ID_ENV_VAR ] ;
448+ delete process . env [ PROFILER_SHARDER_ID_ENV_VAR ] ;
455449 sw . cleanupIfCoordinator ( ) ;
456450 expect ( vol . toJSON ( ) ) . not . toStrictEqual ( { } ) ;
457451 expect ( sw . getState ( ) ) . toBe ( 'active' ) ;
0 commit comments