This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrpc-timeouts.feature
50 lines (39 loc) · 1.69 KB
/
rpc-timeouts.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@rpc @timeout
Feature: RPC Timeouts
Remote Procedure Calls are deepstream's
concept of request-response communication.
This requires a client that makes the RPC
(requestor or receiver) and another client
that answers it (provider).
Whenever a provide or unprovide event does not
recieve an acknolowdgement from the server the
client should emit an ack timeout error so
that the client can attempt to retry.
Scenario: RPC Timeouts
# The client is connected
Given the test server is ready
And the client is initialised
And the server sends the message C|A+
And the client logs in with username "XXX" and password "YYY"
And the server sends the message A|A+
# Making
# The client makes an RPC
When the client requests RPC "toUppercase" with data "abc"
Then the last message the server recieved is P|REQ|toUppercase|<UID>|Sabc+
# The client receives a timeout
When some time passes
Then the client recieves an error RPC callback for "toUppercase" with the message "RESPONSE_TIMEOUT"
# Providing
# The client provides a RPC
When the client provides a RPC called "toUppercase"
Then the last message the server recieved is P|S|toUppercase+
# The server does not respond in time with a subscribe ACK
When some time passes
Then the client throws a "ACK_TIMEOUT" error with message "No ACK message received in time for toUppercase"
# Unproviding
# The client stops providing a RPC
When the client stops providing a RPC called "toUppercase"
Then the last message the server recieved is P|US|toUppercase+
# The server does not respond in time with an unsubscribe ACK
When some time passes
Then the client throws a "ACK_TIMEOUT" error with message "No ACK message received in time for toUppercase"