View Issue Details

IDProjectCategoryView StatusLast Update
0007547CTT UA Scripts1 - Script Issuepublic2022-09-29 16:07
ReporterEmil Söder Assigned ToYannik Klaass  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.03.501 
Summary0007547: Do not think that Subscription Services --> Subscription Basic --> Err-023 work as intended.
Description

According to the test description the script should make a republish call using a sequenceNumber that had previously acknowledged in a publish call but it seems that this not is the case. From what I can see, the latest sequence number is used instead of the first one , whitch is acknowledged, and this leads to our device responding with "Good" as it is a valid sequenceNumber instead of expected "BadMessageNotAvailable" see attached wireshark snippets.

Steps To Reproduce

Run the test and check wireshark.

Additional Information

Suggested solution:

Get the received sequence number before the ack is made i.e.

function republish5105Err006() {
var subscription = new Subscription();
CreateSubscriptionHelper.Execute( { Subscription: subscription } );

// create monitored items
if( SubscriptionMonitoredItems.length === 0 ) {
    addSkipped( "Static Scalar - 2 Nodes needed" );
    return( false );
}

if( !CreateMonitoredItemsHelper.Execute( { ItemsToCreate: SubscriptionMonitoredItems, TimestampsToReturn: TimestampsToReturn.Both, SubscriptionId: subscription } ) ) return( false );

PublishHelper.WaitInterval( { Items: SubscriptionMonitoredItems, Subscription: subscription } );

// call Publish() to get the first sequence number
if( !PublishHelper.Execute() ) {
    DeleteSubscriptionsHelper.Execute( { SubscriptionIds: subscription } );
    return( false );
}

var FirstReceivedSequenceNumber = PublishHelper.ReceivedSequenceNumbers.pop();

// call Publish()() to acknowledge the first sequence
PublishHelper.Execute();

// call republish with the sequence number received above
RepublishHelper.Execute( { RetransmitSequenceNumber: FirstReceivedSequenceNumber, SubscriptionId: subscription, ServiceResult: new ExpectedAndAcceptedResults( [ StatusCode.BadMessageNotAvailable, StatusCode.BadMessageNotAvailable ] ) } );

// clean-up
DeleteMonitoredItemsHelper.Execute( { ItemsToDelete: SubscriptionMonitoredItems, SubscriptionId: subscription } );
DeleteSubscriptionsHelper.Execute ( { SubscriptionIds: subscription } );
return( true );

}

TagsNo tags attached.
Attached Files
CaptureErr23.png (144,929 bytes)   
CaptureErr23.png (144,929 bytes)   
Files Affected

/maintree/Subscription Services/Subscription Basic/Test Cases/Err-023.js

Activities

Yannik Klaass

2022-04-20 08:27

developer   ~0016599

The code was indeed using the latest sequence number instead of the first one, which only worked when it was the only one. Updated the code to use the first sequence number instead.

Paul Hunkar

2022-09-29 16:07

administrator   ~0017901

review issue in call, agreed to changes and closed issue

Issue History

Date Modified Username Field Change
2022-01-13 07:23 Emil Söder New Issue
2022-01-13 07:23 Emil Söder File Added: CaptureErr23.png
2022-02-25 16:35 Paul Hunkar Assigned To => Alexander Allmendinger
2022-02-25 16:35 Paul Hunkar Status new => assigned
2022-03-30 07:58 Yannik Klaass Assigned To Alexander Allmendinger => Yannik Klaass
2022-04-20 08:27 Yannik Klaass Status assigned => resolved
2022-04-20 08:27 Yannik Klaass Resolution open => fixed
2022-04-20 08:27 Yannik Klaass Note Added: 0016599
2022-08-02 20:03 Paul Hunkar Project Compliance Test Tool (CTT) Unified Architecture => CTT UA Scripts
2022-08-02 20:23 Paul Hunkar Project CTT UA Scripts => .NET API
2022-08-02 20:23 Paul Hunkar Category 1 - Script Issue => Api Change
2022-08-04 14:24 Paul Hunkar Project .NET API => Compliance Test Tool (CTT) Unified Architecture
2022-09-29 16:04 Paul Hunkar Category Api Change => 1 - Script Issue
2022-09-29 16:04 Paul Hunkar Description Updated
2022-09-29 16:04 Paul Hunkar Additional Information Updated
2022-09-29 16:04 Paul Hunkar Files Affected => /maintree/Subscription Services/Subscription Basic/Test Cases/Err-023.js
2022-09-29 16:05 Paul Hunkar Project Compliance Test Tool (CTT) Unified Architecture => CTT UA Scripts
2022-09-29 16:07 Paul Hunkar Status resolved => closed
2022-09-29 16:07 Paul Hunkar Fixed in Version => 1.03.501
2022-09-29 16:07 Paul Hunkar Note Added: 0017901