Subscription Durable

Support setting Subscriptions in durable mode. This mode requires that collected data and events are stored and delivered even if a Client was disconnected for a longer time or the Server was restarted. Support one of the “Subscription Durable StorageLevel nnn” ConformanceUnits.


Questions? Contact us
Generated: 21/11/2021 at 17:21:20 p.m.
Subscription Durable - 20 Test Cases
Test Case Id Test Type Keywords Test Case Description Test Requirements Expected Result

000

CTT Unavailable  UA 1.03  Check the SetSubscriptionDurable if method exists in the Server object and that it exists as defined in the specifications.
Method must exist, if not, then skip this and all other tests. NodeId and BrowseName are correct. The parameters are [in] UInt32 subscriptionID, [in] UInt32 lifetimeInHours, [out] UInt32 revisedLifetimeHours.

001

CTT Unavailable  UA 1.03  Invoke SetSubscriptionDurable and set default values for all parameters.
Create a subscription using default parameter values; with zero monitored items. Success.

002

CTT Unavailable  UA 1.03  Specify a lifetimeInHours that is the max size of a UInt32.
Success, the revisedLifetimeHours may be different. Issue a warning if the revised value is different from the request (not a failure!)

003

CTT Unavailable  UA 1.03  Specify a lifetimeInHours that is zero.
Success, but the revisedLifetimeHours should be revised to the highest duration.

004

CTT Unavailable  UA 1.03  Setup a durable subscription with one monitored item (system time). Make sure the subscription is working via a call to Publish().
Step #
Action
Expected Result(s)

1

Client application is monitoring values which are changing, such as the system time.

2

Close the session without closing the subscription.

Success.

3

Wait a few seconds and the reconnect the client to the Server.

Server responds to the client with the current data values along with the values that were captured and buffered while the client was offline.

4

Transfer the subscription to the new session

Success.

5

In a loop, call Publish until all buffered data changes are received by comparing the timestamps.

Success.

005

CTT Unavailable  UA 1.03  Add monitored items with large (i.e. 10,000) buffer size to a Durable subscription.
Step #
Action
Expected Result(s)

1

All calls are successful.

2

For a period of at least 30-minutes (recommended half of the revised Queue Size), write as many values as possible to the item; without calling Publish.

All calls are successful.

3

Call Publish.

Data is returned for the Publish call. The number of values received might match the number of values written; if not, then the MoreNotifications flag is set and subsequent Publish calls are made to obtain the remaining data.

006

Lab Establish a durable subscription with multiple monitored items.
Step #
Action
Expected Result(s)

1

All calls are successful.

2

Shutdown the server/device, gracefully.

3

Startup the server/device.

4

Reconnect the client.

5

Check the servers' diagnostics for the presence of the subscription. Note: if diagnostics is supported; otherwise skip this step

subscription exists in the subscriptionDiagnostics array under the ServerObject.

6

Reclaim the subscription, and check the status of the subscription. Note: Client must remember the subscription id, last sequence number, and (optionally) monitored item handles.

Subscription exists and all subscription/monitoredItems settings are preserved.

007

CTT Unavailable  UA 1.03  Create a Durable subscription and then add 1 or more monitored items.
Create a session using a username/password

008

CTT Unavailable  UA 1.03  Create a Durable subscription with 1 or more monitored items.
Create a session using a username/password
Step #
Action
Expected Result(s)

1

All calls are successful.

2

In a loop: (a) write a new value to all items (b) wait one publishing interval. This should cause the notification queue to accumulate.

All calls are successful.

3

Close the session without deleting the subscription.

All calls are successful.

4

Open a new session using the same user as previously used and transfer the durable subscription to it.

All calls are successful.

5

In a loop call Publish (the loop is the same # of iterations as the previous step + 1)

All calls are successful. Data changes are received for each of the writes/loops in step #2. The last call to Publish is a keep-alive.

009

Lab Create a durable subscription with the Server.Notifier (events; specify a filter to receive any kind of event).

Note: Server must generate events or provide a mechanism to generate events, e.g. writing to a node or invoking a method.
Create a session using a username/password
Step #
Action
Expected Result(s)

1

All calls are successful.

2

Call Publish.

One or more Events are received.

3

Cause events to generate.

All calls are successful.

4

Close the session.

All calls are successful.

5

Open a new session using the same user as previously used and transfer the durable subscription to it.

All calls are successful.

6

Call Publish.

One or more Events are received.

010

CTT Unavailable  UA 1.03  Create a durable subscription with 0 monitored items.
Step #
Action
Expected Result(s)

1

All calls are successful.

2

Invoke the method again using different parameter values.

All calls are successful.

011

CTT Unavailable  UA 1.03  Create a durable subscription
Step #
Action
Expected Result(s)

1

All calls are successful.

2

add a MonitoredItem and call SetDurableSubscription again.

Method fails with BadInvalidState

3

remove the monitored item

All calls are successful.

4

call SetDurableSubscription again.

All calls are successful.

012

CTT Unavailable  UA 1.03  Create a subscription with parameters that will cause the subscription to have a short lifespan, i.e. requestedLifetimeCount=3; requestedPublishingInterval=500; requestedMaxKeepAliveCount=3
Step #
Action
Expected Result(s)

1

All calls are successful.

2

Invoke SetSubscriptionDurable on the subscription with a 1-hour lifetimeInHours.

3

Check the Subscription diagnostics object to see if the revised parameters have changed, i.e. lifetimeCount Note: This step should be skipped if diagnostics is not supported.

4

Wait a period of time that should cause the subscription to timeout, based on the values set in step #1. Call Publish.

Keep alive expected.

5

Modify the subscription to use the same parameters as specified in step #1

6

Wait a period of time that should cause the subscription to timeout, based on the values set in step #1. Call Publish.

Subscription is timed out and a Bad_NoSubscription is returned in the PublishResponse.

Err-001

CTT Unavailable  UA 1.03  Invoke SetSubscriptionDurable without specifying any parameters.
Service result: good; operation result: badArgumentsMissing.

Err-002

CTT Unavailable  UA 1.03  Invoke SetSubscriptionDurable while specifying one of the two parameters.
Service result: good; operation result: badArgumentsMissing.

Err-003

CTT Unavailable  UA 1.03  Invoke SetSubscriptionDurable while specifying three UINT parameters.
Service result: good; operation result: badTooManyArguments.

Err-004

CTT Unavailable  UA 1.03  Invoke SetSubscriptionDurable while specifying the right number of parametes, but wrong data-types; repeat for all [IN] parameters.
Service result: good; operation result: badTypeMismatch.

Err-005

CTT Unavailable  UA 1.03  Create a subscription and add one or more monitored items to it. Then invoke SetSubscriptionDurable on the subscription.
Service result good; operation result: badInvalidState

Err-006

CTT Unavailable  UA 1.03  Specify a subscriptionId that belongs to another session.
Service result: good; operation result: badUserAccessDenied

Err-007

CTT Unavailable  UA 1.03  Specify a subscriptionId that is known to not exist.
Service result: good; operation result: badSubscriptionIdInvalid