@@ -75,11 +75,11 @@ describe('NodeJS Profiler Integration', () => {
7575 ) . resolves . toBe ( 'async-result' ) ;
7676 } ) ;
7777
78- it ( 'should disable profiling and close sink' , ( ) => {
78+ it ( 'should disable profiling and keep sink open ' , ( ) => {
7979 nodejsProfiler . setEnabled ( false ) ;
8080 expect ( nodejsProfiler . isEnabled ( ) ) . toBeFalse ( ) ;
81- expect ( mockSink . isClosed ( ) ) . toBeTrue ( ) ;
82- expect ( mockSink . close ) . toHaveBeenCalledOnce ( ) ;
81+ expect ( mockSink . isClosed ( ) ) . toBeFalse ( ) ;
82+ expect ( mockSink . close ) . not . toHaveBeenCalled ( ) ;
8383
8484 expect ( nodejsProfiler . measure ( 'disabled-test' , ( ) => 'success' ) ) . toBe (
8585 'success' ,
@@ -132,7 +132,7 @@ describe('NodeJS Profiler Integration', () => {
132132
133133 const bufferedStats = bufferedProfiler . stats ;
134134 expect ( bufferedStats . state ) . toBe ( 'running' ) ;
135- expect ( bufferedStats . walOpen ) . toBeTrue ( ) ;
135+ expect ( bufferedStats . sinkOpen ) . toBeTrue ( ) ;
136136 expect ( bufferedStats . isSubscribed ) . toBeTrue ( ) ;
137137 expect ( bufferedStats . queued ) . toBe ( 0 ) ;
138138 expect ( bufferedStats . dropped ) . toBe ( 0 ) ;
@@ -156,7 +156,7 @@ describe('NodeJS Profiler Integration', () => {
156156
157157 const stats = statsProfiler . stats ;
158158 expect ( stats . state ) . toBe ( 'running' ) ;
159- expect ( stats . walOpen ) . toBeTrue ( ) ;
159+ expect ( stats . sinkOpen ) . toBeTrue ( ) ;
160160 expect ( stats . isSubscribed ) . toBeTrue ( ) ;
161161 expect ( typeof stats . queued ) . toBe ( 'number' ) ;
162162 expect ( typeof stats . dropped ) . toBe ( 'number' ) ;
@@ -178,7 +178,7 @@ describe('NodeJS Profiler Integration', () => {
178178
179179 const initialStats = profiler . stats ;
180180 expect ( initialStats . state ) . toBe ( 'running' ) ;
181- expect ( initialStats . walOpen ) . toBeTrue ( ) ;
181+ expect ( initialStats . sinkOpen ) . toBeTrue ( ) ;
182182 expect ( initialStats . isSubscribed ) . toBeTrue ( ) ;
183183 expect ( initialStats . queued ) . toBe ( 0 ) ;
184184 expect ( initialStats . dropped ) . toBe ( 0 ) ;
@@ -193,7 +193,7 @@ describe('NodeJS Profiler Integration', () => {
193193
194194 const finalStats = profiler . stats ;
195195 expect ( finalStats . state ) . toBe ( 'idle' ) ;
196- expect ( finalStats . walOpen ) . toBeFalse ( ) ;
196+ expect ( finalStats . sinkOpen ) . toBeTrue ( ) ;
197197 expect ( finalStats . isSubscribed ) . toBeFalse ( ) ;
198198 expect ( finalStats . queued ) . toBe ( 0 ) ;
199199
0 commit comments