[VOL-4067] : Fix mechanism used for closing PM collector, alarm manager
             and self test handler module routines

Change-Id: Iec97d3a114191b15e00698b35da47555a9359935
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 4330741..3dbaf48 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -2112,6 +2112,9 @@
 	if dh.getAlarmManagerIsRunning(ctx) {
 		dh.stopAlarmManager <- true
 	}
+	if dh.pSelfTestHdlr.GetSelfTestHandlerIsRunning() {
+		dh.pSelfTestHdlr.stopSelfTestModule <- true
+	}
 
 	//reset a possibly running upgrade FSM
 	//  (note the Upgrade FSM may stay alive e.g. in state upgradeStWaitForCommit to endure the ONU reboot)