View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0010227 | Compliance Test Tool (CTT) Unified Architecture | 1 - Script Issue | public | 2025-03-11 16:51 | 2025-03-13 13:57 |
| Reporter | V. Monfort | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | sometimes |
| Status | new | Resolution | open | ||
| Product Version | 1.04.11-01.00.508 | ||||
| Summary | 0010227: A&C AlarmCollector dispatches the same event unexpectedly to next test case on TestCompleted | ||||
| Description | By running the A&C Ack tests Test_003, Err_004 and Err_005, I had some issue for Err_005 failure indicating Bad*AlreadyAcked. In my case, Err_004 was calling the TestCompleted function which changes the state to the next TestCase at same time and then the SingleLoop call the TestEvent function of Err_005 on the same event instance. This behavior makes extremely hard to understand what is going on and script issue is actually shared between several tests, I would advise to avoid dispatching the same event to several test cases since the alarm condition is expected to do a cycle it is possible to wait for the next event for starting the next test. I suspect that this kind of issues occur in several A&C test cases since I observed instability when running the A&C tests making hard to reproduce failures in general, | ||||
| Steps To Reproduce | By running the A&C Ack tests Test_003, Err_004 and Err_005, Here follows an extract of the Script output console that shows the same event is dispatched to both tests leading to the described issue: SelectFields Adding Test Test_003 ... 2025-03-11T10:21:21.468Z - ns=1;i=15011 CanRunTest Err_004 = true Current State Err_004_Running 2025-03-11T10:21:21.470Z - ns=1;i=15011 CanRunTest Err_005 = true Current State Err_005_Running | ||||
| Tags | No tags attached. | ||||
| Attached Files | AlarmCollector.patch (1,728 bytes)
@@ -316,11 +315,20 @@ function AlarmCollector ( cuVariables, customInitialize ) {
var stateIndex = this.TestStateEnum.LookupState.Get( stateHolder.State );
var nextState = this.TestStateEnum.LookupIndex.Get( stateIndex + 1 );
if ( isDefined( nextState ) ) {
- stateHolder.State = nextState;
+ stateHolder.NextState = nextState;
}
}
}
+ this.FinalizeNextTestState = function ( conditionId ) {
+ var key = conditionId.toString();
+ var stateHolder = this.TestIdStateMap.Get( key );
+ if ( isDefined( stateHolder.NextState ) ) {
+ stateHolder.State = stateHolder.NextState
+ stateHolder.NextState = null;
+ }
+ }
+
/**
* Helper function to make skipping a test case easier
* @param {string} testName - Test Case Name
@@ -583,7 +591,7 @@ function AlarmCollector ( cuVariables, customInitialize ) {
this.ForEachTest( PreLoopAction, events );
for ( var eventIndex = 0; eventIndex < events.length; eventIndex++ ) {
var eventFields = events[ eventIndex ].EventFieldList.EventFields;
-
+ var conditionId = this.GetConditionId( eventFields );
var eventType = eventFields[ this.EventTypeIndex ].toNodeId();
@@ -612,6 +620,8 @@ function AlarmCollector ( cuVariables, customInitialize ) {
}
}
}
+ // Update the state if a test case was completed
+ this.FinalizeNextTestState(conditionId);
}
this.ForEachTest( PostLoopAction );
this.AlarmTester.RemoveEntry( events );
| ||||
| Files Affected | |||||
|
|
Same patch with minor fix 0001-UACTT-A-C-AlarmCollector-fix-unstable-behavior-due-o.patch (2,183 bytes)
---
.../library/AlarmsAndConditions/AlarmCollector.js | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/UACTT_project/library/AlarmsAndConditions/AlarmCollector.js b/UACTT_project/library/AlarmsAndConditions/AlarmCollector.js
index 89300441..cbab3007 100755
--- a/UACTT_project/library/AlarmsAndConditions/AlarmCollector.js
+++ b/UACTT_project/library/AlarmsAndConditions/AlarmCollector.js
@@ -316,11 +316,20 @@ function AlarmCollector ( cuVariables, customInitialize ) {
var stateIndex = this.TestStateEnum.LookupState.Get( stateHolder.State );
var nextState = this.TestStateEnum.LookupIndex.Get( stateIndex + 1 );
if ( isDefined( nextState ) ) {
- stateHolder.State = nextState;
+ stateHolder.NextState = nextState;
}
}
}
+ this.FinalizeNextTestState = function ( conditionId ) {
+ var key = conditionId.toString();
+ var stateHolder = this.TestIdStateMap.Get( key );
+ if ( isDefined( stateHolder) && isDefined( stateHolder.NextState ) ) {
+ stateHolder.State = stateHolder.NextState
+ stateHolder.NextState = null;
+ }
+ }
+
/**
* Helper function to make skipping a test case easier
* @param {string} testName - Test Case Name
@@ -583,7 +592,7 @@ function AlarmCollector ( cuVariables, customInitialize ) {
this.ForEachTest( "PreLoopAction", events );
for ( var eventIndex = 0; eventIndex < events.length; eventIndex++ ) {
var eventFields = events[ eventIndex ].EventFieldList.EventFields;
-
+ var conditionId = this.GetConditionId( eventFields );
var eventType = eventFields[ this.EventTypeIndex ].toNodeId();
if ( !isDefined( eventType ) ) {
@@ -612,6 +621,8 @@ function AlarmCollector ( cuVariables, customInitialize ) {
}
}
}
+ // Update the state if a test case was completed
+ this.FinalizeNextTestState(conditionId);
}
this.ForEachTest( "PostLoopAction" );
this.AlarmTester.RemoveEntry( events );
--
2.43.0
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-03-11 16:51 | V. Monfort | New Issue | |
| 2025-03-11 16:51 | V. Monfort | File Added: AlarmCollector.patch | |
| 2025-03-13 13:57 | V. Monfort | Note Added: 0022529 | |
| 2025-03-13 13:57 | V. Monfort | File Added: 0001-UACTT-A-C-AlarmCollector-fix-unstable-behavior-due-o.patch |