[incident #1878954] code fixed: DTE in CLL: EPTF_CLL_CLI_Functions.ttcn:531(function:f_EPTF_CLI_executeCommand) Dynamic test case error: Index overflow
Change-Id: Ia772469ebb7f3441180b90ad965f3021824155c2
Signed-off-by: József Gyürüsi <jozsef.gyurusi@ericsson.com>
diff --git a/src/Semaphore/EPTF_CLL_Semaphore_Functions.ttcn b/src/Semaphore/EPTF_CLL_Semaphore_Functions.ttcn
index ae0be6f..a3aa040 100644
--- a/src/Semaphore/EPTF_CLL_Semaphore_Functions.ttcn
+++ b/src/Semaphore/EPTF_CLL_Semaphore_Functions.ttcn
@@ -291,6 +291,7 @@
// This function waits until the semaphore is unlocked. Meanwhile all default altsteps are executing in the background.
// The function exits when the semaphore is unlocked or the specified time has passed.
// Automatically deletes the semaphore at exit if pl_autoDeleteSemaphore is not specified.
+// If max waiting time is reached, the semaphore is not deleted even if pl_autoDeleteSemaphore is set true to avoid reusing it before user deletes it.
//
///////////////////////////////////////////////////////////
public function f_EPTF_Semaphore_waitForUnlock(in integer pl_idx, in float pl_maxWaitTime := -1.0, in boolean pl_autoDeleteSemaphore := true) runs on EPTF_Semaphore_CT return boolean {
@@ -310,7 +311,7 @@
repeat;
}
}
- if (pl_autoDeleteSemaphore) {
+ if (pl_autoDeleteSemaphore and not vl_maxTimerExpired) {
f_EPTF_Semaphore_delete(pl_idx);
}
return vl_maxTimerExpired;