File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
testObservability/reporter Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ class MyReporter {
209209 }
210210
211211 await this . uploadTestSteps ( ) ;
212+ this . stopHttpServer ( ) ;
212213 } ) ;
213214 }
214215
@@ -277,6 +278,20 @@ class MyReporter {
277278 debugOnConsole ( `Exception in starting reporter server : ${ error } ` ) ;
278279 debug ( `Exception in starting reporter server : ${ error } ` , true , error ) ;
279280 }
281+ }
282+
283+ stopHttpServer ( ) {
284+ if ( this . httpServer ) {
285+ try {
286+ this . httpServer . close ( ( ) => {
287+ debugOnConsole ( 'Reporter HTTP server closed' ) ;
288+ } ) ;
289+ this . httpServer = null ;
290+ } catch ( error ) {
291+ debugOnConsole ( `Exception in stopping reporter server : ${ error } ` ) ;
292+ debug ( `Exception in stopping reporter server : ${ error } ` , true , error ) ;
293+ }
294+ }
280295 }
281296
282297 registerListeners ( ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const TESTHUB_CONSTANTS = require("./constants");
55const testObservabilityHelper = require ( "../../bin/testObservability/helper/helper" ) ;
66const helper = require ( "../helpers/helper" ) ;
77const accessibilityHelper = require ( "../accessibility-automation/helper" ) ;
8- const { detect } = require ( 'detect-port' ) ;
8+ const detect = require ( 'detect-port' ) ;
99
1010
1111const isUndefined = ( value ) => value === undefined || value === null ;
You can’t perform that action at this time.
0 commit comments