@durable-streams/client-conformance-tests 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +451 -0
- package/dist/adapters/typescript-adapter.d.ts +1 -0
- package/dist/adapters/typescript-adapter.js +586 -0
- package/dist/benchmark-runner-C_Yghc8f.js +1333 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +265 -0
- package/dist/index.d.ts +508 -0
- package/dist/index.js +4 -0
- package/dist/protocol-DyEvTHPF.d.ts +472 -0
- package/dist/protocol-qb83AeUH.js +120 -0
- package/dist/protocol.d.ts +2 -0
- package/dist/protocol.js +3 -0
- package/package.json +53 -0
- package/src/adapters/typescript-adapter.ts +848 -0
- package/src/benchmark-runner.ts +860 -0
- package/src/benchmark-scenarios.ts +311 -0
- package/src/cli.ts +294 -0
- package/src/index.ts +50 -0
- package/src/protocol.ts +656 -0
- package/src/runner.ts +1191 -0
- package/src/test-cases.ts +475 -0
- package/test-cases/consumer/cache-headers.yaml +150 -0
- package/test-cases/consumer/error-handling.yaml +108 -0
- package/test-cases/consumer/message-ordering.yaml +209 -0
- package/test-cases/consumer/offset-handling.yaml +209 -0
- package/test-cases/consumer/offset-resumption.yaml +197 -0
- package/test-cases/consumer/read-catchup.yaml +173 -0
- package/test-cases/consumer/read-longpoll.yaml +132 -0
- package/test-cases/consumer/read-sse.yaml +145 -0
- package/test-cases/consumer/retry-resilience.yaml +160 -0
- package/test-cases/consumer/streaming-equivalence.yaml +226 -0
- package/test-cases/lifecycle/dynamic-headers.yaml +147 -0
- package/test-cases/lifecycle/headers-params.yaml +117 -0
- package/test-cases/lifecycle/stream-lifecycle.yaml +148 -0
- package/test-cases/producer/append-data.yaml +142 -0
- package/test-cases/producer/batching.yaml +112 -0
- package/test-cases/producer/create-stream.yaml +87 -0
- package/test-cases/producer/error-handling.yaml +90 -0
- package/test-cases/producer/sequence-ordering.yaml +148 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
id: producer-append
|
|
2
|
+
name: Append Operations
|
|
3
|
+
description: Tests for appending data to streams via the client SDK
|
|
4
|
+
category: producer
|
|
5
|
+
tags:
|
|
6
|
+
- core
|
|
7
|
+
- append
|
|
8
|
+
|
|
9
|
+
tests:
|
|
10
|
+
- id: append-string
|
|
11
|
+
name: Append string data
|
|
12
|
+
description: Client should append string data to a stream
|
|
13
|
+
setup:
|
|
14
|
+
- action: create
|
|
15
|
+
as: streamPath
|
|
16
|
+
contentType: text/plain
|
|
17
|
+
operations:
|
|
18
|
+
- action: append
|
|
19
|
+
path: ${streamPath}
|
|
20
|
+
data: "Hello, World!"
|
|
21
|
+
expect:
|
|
22
|
+
status: 200
|
|
23
|
+
storeOffsetAs: offset1
|
|
24
|
+
- action: read
|
|
25
|
+
path: ${streamPath}
|
|
26
|
+
expect:
|
|
27
|
+
data: "Hello, World!"
|
|
28
|
+
upToDate: true
|
|
29
|
+
|
|
30
|
+
- id: append-multiple
|
|
31
|
+
name: Append multiple times
|
|
32
|
+
description: Client should append multiple chunks and they should be concatenated
|
|
33
|
+
setup:
|
|
34
|
+
- action: create
|
|
35
|
+
as: streamPath
|
|
36
|
+
contentType: text/plain
|
|
37
|
+
operations:
|
|
38
|
+
- action: append
|
|
39
|
+
path: ${streamPath}
|
|
40
|
+
data: "First "
|
|
41
|
+
expect:
|
|
42
|
+
status: 200
|
|
43
|
+
- action: append
|
|
44
|
+
path: ${streamPath}
|
|
45
|
+
data: "Second "
|
|
46
|
+
expect:
|
|
47
|
+
status: 200
|
|
48
|
+
- action: append
|
|
49
|
+
path: ${streamPath}
|
|
50
|
+
data: "Third"
|
|
51
|
+
expect:
|
|
52
|
+
status: 200
|
|
53
|
+
- action: read
|
|
54
|
+
path: ${streamPath}
|
|
55
|
+
expect:
|
|
56
|
+
data: "First Second Third"
|
|
57
|
+
upToDate: true
|
|
58
|
+
|
|
59
|
+
- id: append-binary
|
|
60
|
+
name: Append binary data
|
|
61
|
+
description: Client should append binary data to a stream
|
|
62
|
+
setup:
|
|
63
|
+
- action: create
|
|
64
|
+
as: streamPath
|
|
65
|
+
contentType: application/octet-stream
|
|
66
|
+
operations:
|
|
67
|
+
- action: append
|
|
68
|
+
path: ${streamPath}
|
|
69
|
+
binaryData: "SGVsbG8gQmluYXJ5IQ==" # "Hello Binary!" in base64
|
|
70
|
+
expect:
|
|
71
|
+
status: 200
|
|
72
|
+
- action: read
|
|
73
|
+
path: ${streamPath}
|
|
74
|
+
expect:
|
|
75
|
+
data: "Hello Binary!"
|
|
76
|
+
|
|
77
|
+
- id: append-empty
|
|
78
|
+
name: Append empty data
|
|
79
|
+
description: Server should reject empty body with 400 per protocol spec
|
|
80
|
+
setup:
|
|
81
|
+
- action: create
|
|
82
|
+
as: streamPath
|
|
83
|
+
operations:
|
|
84
|
+
- action: append
|
|
85
|
+
path: ${streamPath}
|
|
86
|
+
data: ""
|
|
87
|
+
expect:
|
|
88
|
+
status: 400
|
|
89
|
+
|
|
90
|
+
- id: append-large-data
|
|
91
|
+
name: Append large data
|
|
92
|
+
description: Client should handle appending larger chunks of data
|
|
93
|
+
tags:
|
|
94
|
+
- large
|
|
95
|
+
setup:
|
|
96
|
+
- action: create
|
|
97
|
+
as: streamPath
|
|
98
|
+
contentType: text/plain
|
|
99
|
+
operations:
|
|
100
|
+
# 10KB of data
|
|
101
|
+
- action: append
|
|
102
|
+
path: ${streamPath}
|
|
103
|
+
data: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
|
104
|
+
expect:
|
|
105
|
+
status: 200
|
|
106
|
+
- action: read
|
|
107
|
+
path: ${streamPath}
|
|
108
|
+
expect:
|
|
109
|
+
upToDate: true
|
|
110
|
+
|
|
111
|
+
- id: append-unicode
|
|
112
|
+
name: Append unicode data
|
|
113
|
+
description: Client should correctly handle unicode characters
|
|
114
|
+
setup:
|
|
115
|
+
- action: create
|
|
116
|
+
as: streamPath
|
|
117
|
+
contentType: text/plain; charset=utf-8
|
|
118
|
+
operations:
|
|
119
|
+
- action: append
|
|
120
|
+
path: ${streamPath}
|
|
121
|
+
data: "Hello 世界 🌍 Привет мир"
|
|
122
|
+
expect:
|
|
123
|
+
status: 200
|
|
124
|
+
- action: read
|
|
125
|
+
path: ${streamPath}
|
|
126
|
+
expect:
|
|
127
|
+
data: "Hello 世界 🌍 Привет мир"
|
|
128
|
+
|
|
129
|
+
- id: append-with-custom-headers
|
|
130
|
+
name: Append with custom headers
|
|
131
|
+
description: Client should pass through custom headers on append
|
|
132
|
+
setup:
|
|
133
|
+
- action: create
|
|
134
|
+
as: streamPath
|
|
135
|
+
operations:
|
|
136
|
+
- action: append
|
|
137
|
+
path: ${streamPath}
|
|
138
|
+
data: "test"
|
|
139
|
+
headers:
|
|
140
|
+
X-Request-Id: "12345"
|
|
141
|
+
expect:
|
|
142
|
+
status: 200
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
id: producer-batching
|
|
2
|
+
name: Automatic Batching
|
|
3
|
+
description: Tests for automatic batching behavior in producer clients
|
|
4
|
+
category: producer
|
|
5
|
+
tags:
|
|
6
|
+
- batching
|
|
7
|
+
- advanced
|
|
8
|
+
requires:
|
|
9
|
+
- batching
|
|
10
|
+
|
|
11
|
+
tests:
|
|
12
|
+
- id: batch-concurrent-appends
|
|
13
|
+
name: Concurrent appends are batched
|
|
14
|
+
description: Multiple concurrent append calls should be batched into fewer HTTP requests
|
|
15
|
+
setup:
|
|
16
|
+
- action: create
|
|
17
|
+
as: streamPath
|
|
18
|
+
contentType: text/plain
|
|
19
|
+
operations:
|
|
20
|
+
- action: append-batch
|
|
21
|
+
path: ${streamPath}
|
|
22
|
+
items:
|
|
23
|
+
- data: "item1"
|
|
24
|
+
- data: "item2"
|
|
25
|
+
- data: "item3"
|
|
26
|
+
- data: "item4"
|
|
27
|
+
- data: "item5"
|
|
28
|
+
expect:
|
|
29
|
+
allSucceed: true
|
|
30
|
+
- action: read
|
|
31
|
+
path: ${streamPath}
|
|
32
|
+
expect:
|
|
33
|
+
dataContainsAll:
|
|
34
|
+
- "item1"
|
|
35
|
+
- "item2"
|
|
36
|
+
- "item3"
|
|
37
|
+
- "item4"
|
|
38
|
+
- "item5"
|
|
39
|
+
upToDate: true
|
|
40
|
+
|
|
41
|
+
- id: batch-preserves-order
|
|
42
|
+
name: Batched appends preserve order
|
|
43
|
+
description: Even when batched, appends should maintain their logical order
|
|
44
|
+
setup:
|
|
45
|
+
- action: create
|
|
46
|
+
as: streamPath
|
|
47
|
+
contentType: text/plain
|
|
48
|
+
operations:
|
|
49
|
+
- action: append-batch
|
|
50
|
+
path: ${streamPath}
|
|
51
|
+
items:
|
|
52
|
+
- data: "1"
|
|
53
|
+
- data: "2"
|
|
54
|
+
- data: "3"
|
|
55
|
+
- data: "4"
|
|
56
|
+
- data: "5"
|
|
57
|
+
expect:
|
|
58
|
+
allSucceed: true
|
|
59
|
+
- action: read
|
|
60
|
+
path: ${streamPath}
|
|
61
|
+
expect:
|
|
62
|
+
data: "12345"
|
|
63
|
+
upToDate: true
|
|
64
|
+
|
|
65
|
+
- id: batch-with-sequences
|
|
66
|
+
name: Batched appends with sequence numbers
|
|
67
|
+
description: Batched appends should respect sequence ordering
|
|
68
|
+
setup:
|
|
69
|
+
- action: create
|
|
70
|
+
as: streamPath
|
|
71
|
+
operations:
|
|
72
|
+
- action: append-batch
|
|
73
|
+
path: ${streamPath}
|
|
74
|
+
items:
|
|
75
|
+
- data: "a"
|
|
76
|
+
seq: 1
|
|
77
|
+
- data: "b"
|
|
78
|
+
seq: 2
|
|
79
|
+
- data: "c"
|
|
80
|
+
seq: 3
|
|
81
|
+
expect:
|
|
82
|
+
allSucceed: true
|
|
83
|
+
- action: read
|
|
84
|
+
path: ${streamPath}
|
|
85
|
+
expect:
|
|
86
|
+
data: "abc"
|
|
87
|
+
|
|
88
|
+
- id: batch-partial-failure
|
|
89
|
+
name: Batched appends with partial failure
|
|
90
|
+
description: If one item in a batch fails due to sequence conflict, others should still succeed
|
|
91
|
+
setup:
|
|
92
|
+
- action: create
|
|
93
|
+
as: streamPath
|
|
94
|
+
operations:
|
|
95
|
+
# First establish seq 1
|
|
96
|
+
- action: append
|
|
97
|
+
path: ${streamPath}
|
|
98
|
+
data: "existing"
|
|
99
|
+
seq: 1
|
|
100
|
+
# Now try a batch where one has a conflicting seq
|
|
101
|
+
- action: append-batch
|
|
102
|
+
path: ${streamPath}
|
|
103
|
+
items:
|
|
104
|
+
- data: "new1"
|
|
105
|
+
seq: 2
|
|
106
|
+
- data: "conflict"
|
|
107
|
+
seq: 1 # This should fail
|
|
108
|
+
- data: "new2"
|
|
109
|
+
seq: 3
|
|
110
|
+
expect:
|
|
111
|
+
succeedIndices: [0, 2]
|
|
112
|
+
failIndices: [1]
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
id: producer-create
|
|
2
|
+
name: Stream Creation
|
|
3
|
+
description: Tests for creating streams via the client SDK
|
|
4
|
+
category: producer
|
|
5
|
+
tags:
|
|
6
|
+
- core
|
|
7
|
+
- create
|
|
8
|
+
|
|
9
|
+
tests:
|
|
10
|
+
- id: create-basic
|
|
11
|
+
name: Create a new stream
|
|
12
|
+
description: Client should successfully create a new stream with default settings
|
|
13
|
+
operations:
|
|
14
|
+
- action: create
|
|
15
|
+
as: streamPath
|
|
16
|
+
expect:
|
|
17
|
+
status: 201
|
|
18
|
+
|
|
19
|
+
- id: create-with-content-type
|
|
20
|
+
name: Create stream with custom content type
|
|
21
|
+
description: Client should set the content type when creating a stream
|
|
22
|
+
operations:
|
|
23
|
+
- action: create
|
|
24
|
+
as: streamPath
|
|
25
|
+
contentType: application/json
|
|
26
|
+
expect:
|
|
27
|
+
status: 201
|
|
28
|
+
- action: head
|
|
29
|
+
path: ${streamPath}
|
|
30
|
+
expect:
|
|
31
|
+
status: 200
|
|
32
|
+
contentType: application/json
|
|
33
|
+
|
|
34
|
+
- id: create-idempotent
|
|
35
|
+
name: Create is idempotent
|
|
36
|
+
description: Creating the same stream twice should succeed (return 200 on second call)
|
|
37
|
+
operations:
|
|
38
|
+
- action: create
|
|
39
|
+
as: streamPath
|
|
40
|
+
contentType: text/plain
|
|
41
|
+
expect:
|
|
42
|
+
status: 201
|
|
43
|
+
- action: create
|
|
44
|
+
path: ${streamPath}
|
|
45
|
+
contentType: text/plain
|
|
46
|
+
expect:
|
|
47
|
+
status: 200
|
|
48
|
+
|
|
49
|
+
- id: create-with-ttl
|
|
50
|
+
name: Create stream with TTL
|
|
51
|
+
description: Client should set TTL header when creating a stream
|
|
52
|
+
operations:
|
|
53
|
+
- action: create
|
|
54
|
+
as: streamPath
|
|
55
|
+
ttlSeconds: 3600
|
|
56
|
+
expect:
|
|
57
|
+
status: 201
|
|
58
|
+
- action: head
|
|
59
|
+
path: ${streamPath}
|
|
60
|
+
expect:
|
|
61
|
+
status: 200
|
|
62
|
+
hasOffset: true
|
|
63
|
+
|
|
64
|
+
- id: create-with-custom-headers
|
|
65
|
+
name: Create stream with custom headers
|
|
66
|
+
description: Client should pass through custom headers
|
|
67
|
+
operations:
|
|
68
|
+
- action: create
|
|
69
|
+
as: streamPath
|
|
70
|
+
headers:
|
|
71
|
+
X-Custom-Header: test-value
|
|
72
|
+
expect:
|
|
73
|
+
status: 201
|
|
74
|
+
|
|
75
|
+
- id: create-binary-stream
|
|
76
|
+
name: Create binary stream
|
|
77
|
+
description: Client should create streams for binary content
|
|
78
|
+
operations:
|
|
79
|
+
- action: create
|
|
80
|
+
as: streamPath
|
|
81
|
+
contentType: application/octet-stream
|
|
82
|
+
expect:
|
|
83
|
+
status: 201
|
|
84
|
+
- action: head
|
|
85
|
+
path: ${streamPath}
|
|
86
|
+
expect:
|
|
87
|
+
contentType: application/octet-stream
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
id: producer-errors
|
|
2
|
+
name: Producer Error Handling
|
|
3
|
+
description: Tests for error handling in producer operations
|
|
4
|
+
category: producer
|
|
5
|
+
tags:
|
|
6
|
+
- core
|
|
7
|
+
- errors
|
|
8
|
+
|
|
9
|
+
tests:
|
|
10
|
+
- id: append-to-nonexistent
|
|
11
|
+
name: Append to non-existent stream
|
|
12
|
+
description: Client should handle 404 when appending to non-existent stream
|
|
13
|
+
operations:
|
|
14
|
+
- action: append
|
|
15
|
+
path: /nonexistent-stream-12345
|
|
16
|
+
data: "test"
|
|
17
|
+
expect:
|
|
18
|
+
status: 404
|
|
19
|
+
errorCode: NOT_FOUND
|
|
20
|
+
|
|
21
|
+
- id: create-then-delete-then-append
|
|
22
|
+
name: Append after delete
|
|
23
|
+
description: Client should handle 404 when stream was deleted
|
|
24
|
+
operations:
|
|
25
|
+
- action: create
|
|
26
|
+
as: streamPath
|
|
27
|
+
expect:
|
|
28
|
+
status: 201
|
|
29
|
+
- action: append
|
|
30
|
+
path: ${streamPath}
|
|
31
|
+
data: "before-delete"
|
|
32
|
+
expect:
|
|
33
|
+
status: 200
|
|
34
|
+
- action: delete
|
|
35
|
+
path: ${streamPath}
|
|
36
|
+
expect:
|
|
37
|
+
status: 200
|
|
38
|
+
- action: append
|
|
39
|
+
path: ${streamPath}
|
|
40
|
+
data: "after-delete"
|
|
41
|
+
expect:
|
|
42
|
+
status: 404
|
|
43
|
+
errorCode: NOT_FOUND
|
|
44
|
+
|
|
45
|
+
- id: connect-nonexistent
|
|
46
|
+
name: Connect to non-existent stream
|
|
47
|
+
description: Client should handle 404 when connecting to non-existent stream
|
|
48
|
+
operations:
|
|
49
|
+
- action: connect
|
|
50
|
+
path: /nonexistent-connect-stream
|
|
51
|
+
expect:
|
|
52
|
+
status: 404
|
|
53
|
+
errorCode: NOT_FOUND
|
|
54
|
+
|
|
55
|
+
- id: head-nonexistent
|
|
56
|
+
name: Head non-existent stream
|
|
57
|
+
description: Client should handle 404 when getting metadata of non-existent stream
|
|
58
|
+
operations:
|
|
59
|
+
- action: head
|
|
60
|
+
path: /nonexistent-head-stream
|
|
61
|
+
expect:
|
|
62
|
+
status: 404
|
|
63
|
+
errorCode: NOT_FOUND
|
|
64
|
+
|
|
65
|
+
- id: delete-nonexistent
|
|
66
|
+
name: Delete non-existent stream
|
|
67
|
+
description: Client should handle 404 when deleting non-existent stream
|
|
68
|
+
operations:
|
|
69
|
+
- action: delete
|
|
70
|
+
path: /nonexistent-delete-stream
|
|
71
|
+
expect:
|
|
72
|
+
status: 404
|
|
73
|
+
errorCode: NOT_FOUND
|
|
74
|
+
|
|
75
|
+
- id: delete-idempotent
|
|
76
|
+
name: Delete is idempotent within session
|
|
77
|
+
description: Deleting twice should not error (second returns 404)
|
|
78
|
+
operations:
|
|
79
|
+
- action: create
|
|
80
|
+
as: streamPath
|
|
81
|
+
expect:
|
|
82
|
+
status: 201
|
|
83
|
+
- action: delete
|
|
84
|
+
path: ${streamPath}
|
|
85
|
+
expect:
|
|
86
|
+
status: 200
|
|
87
|
+
- action: delete
|
|
88
|
+
path: ${streamPath}
|
|
89
|
+
expect:
|
|
90
|
+
status: 404
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
id: producer-sequence
|
|
2
|
+
name: Sequence Ordering
|
|
3
|
+
description: Tests for sequence number handling in append operations
|
|
4
|
+
category: producer
|
|
5
|
+
tags:
|
|
6
|
+
- core
|
|
7
|
+
- sequence
|
|
8
|
+
- ordering
|
|
9
|
+
|
|
10
|
+
tests:
|
|
11
|
+
- id: seq-basic-ordering
|
|
12
|
+
name: Basic sequence ordering
|
|
13
|
+
description: Client should send sequence numbers that enforce ordering
|
|
14
|
+
setup:
|
|
15
|
+
- action: create
|
|
16
|
+
as: streamPath
|
|
17
|
+
operations:
|
|
18
|
+
- action: append
|
|
19
|
+
path: ${streamPath}
|
|
20
|
+
data: "first"
|
|
21
|
+
seq: 1
|
|
22
|
+
expect:
|
|
23
|
+
status: 200
|
|
24
|
+
- action: append
|
|
25
|
+
path: ${streamPath}
|
|
26
|
+
data: "second"
|
|
27
|
+
seq: 2
|
|
28
|
+
expect:
|
|
29
|
+
status: 200
|
|
30
|
+
- action: read
|
|
31
|
+
path: ${streamPath}
|
|
32
|
+
expect:
|
|
33
|
+
data: "firstsecond"
|
|
34
|
+
upToDate: true
|
|
35
|
+
|
|
36
|
+
- id: seq-conflict-detection
|
|
37
|
+
name: Sequence conflict detection
|
|
38
|
+
description: Client should receive 409 when sequence number is too low
|
|
39
|
+
setup:
|
|
40
|
+
- action: create
|
|
41
|
+
as: streamPath
|
|
42
|
+
operations:
|
|
43
|
+
- action: append
|
|
44
|
+
path: ${streamPath}
|
|
45
|
+
data: "first"
|
|
46
|
+
seq: 1
|
|
47
|
+
expect:
|
|
48
|
+
status: 200
|
|
49
|
+
- action: append
|
|
50
|
+
path: ${streamPath}
|
|
51
|
+
data: "second"
|
|
52
|
+
seq: 2
|
|
53
|
+
expect:
|
|
54
|
+
status: 200
|
|
55
|
+
- action: append
|
|
56
|
+
path: ${streamPath}
|
|
57
|
+
data: "out-of-order"
|
|
58
|
+
seq: 1
|
|
59
|
+
expect:
|
|
60
|
+
status: 409
|
|
61
|
+
errorCode: SEQUENCE_CONFLICT
|
|
62
|
+
|
|
63
|
+
- id: seq-skip-numbers
|
|
64
|
+
name: Sequence numbers can skip
|
|
65
|
+
description: Sequence numbers don't need to be consecutive, just monotonically increasing
|
|
66
|
+
setup:
|
|
67
|
+
- action: create
|
|
68
|
+
as: streamPath
|
|
69
|
+
operations:
|
|
70
|
+
- action: append
|
|
71
|
+
path: ${streamPath}
|
|
72
|
+
data: "first"
|
|
73
|
+
seq: 10
|
|
74
|
+
expect:
|
|
75
|
+
status: 200
|
|
76
|
+
- action: append
|
|
77
|
+
path: ${streamPath}
|
|
78
|
+
data: "second"
|
|
79
|
+
seq: 100
|
|
80
|
+
expect:
|
|
81
|
+
status: 200
|
|
82
|
+
- action: append
|
|
83
|
+
path: ${streamPath}
|
|
84
|
+
data: "third"
|
|
85
|
+
seq: 1000
|
|
86
|
+
expect:
|
|
87
|
+
status: 200
|
|
88
|
+
- action: read
|
|
89
|
+
path: ${streamPath}
|
|
90
|
+
expect:
|
|
91
|
+
data: "firstsecondthird"
|
|
92
|
+
|
|
93
|
+
- id: seq-same-number-conflict
|
|
94
|
+
name: Same sequence number causes conflict
|
|
95
|
+
description: Using the same sequence number twice should fail
|
|
96
|
+
setup:
|
|
97
|
+
- action: create
|
|
98
|
+
as: streamPath
|
|
99
|
+
operations:
|
|
100
|
+
- action: append
|
|
101
|
+
path: ${streamPath}
|
|
102
|
+
data: "first"
|
|
103
|
+
seq: 5
|
|
104
|
+
expect:
|
|
105
|
+
status: 200
|
|
106
|
+
- action: append
|
|
107
|
+
path: ${streamPath}
|
|
108
|
+
data: "duplicate"
|
|
109
|
+
seq: 5
|
|
110
|
+
expect:
|
|
111
|
+
status: 409
|
|
112
|
+
errorCode: SEQUENCE_CONFLICT
|
|
113
|
+
|
|
114
|
+
- id: seq-large-numbers
|
|
115
|
+
name: Large sequence numbers
|
|
116
|
+
description: Client should handle large sequence numbers
|
|
117
|
+
setup:
|
|
118
|
+
- action: create
|
|
119
|
+
as: streamPath
|
|
120
|
+
operations:
|
|
121
|
+
- action: append
|
|
122
|
+
path: ${streamPath}
|
|
123
|
+
data: "large-seq"
|
|
124
|
+
seq: 9007199254740991 # Number.MAX_SAFE_INTEGER
|
|
125
|
+
expect:
|
|
126
|
+
status: 200
|
|
127
|
+
|
|
128
|
+
- id: seq-without-seq
|
|
129
|
+
name: Append without sequence number
|
|
130
|
+
description: Client should allow appends without sequence numbers
|
|
131
|
+
setup:
|
|
132
|
+
- action: create
|
|
133
|
+
as: streamPath
|
|
134
|
+
operations:
|
|
135
|
+
- action: append
|
|
136
|
+
path: ${streamPath}
|
|
137
|
+
data: "no-seq-1"
|
|
138
|
+
expect:
|
|
139
|
+
status: 200
|
|
140
|
+
- action: append
|
|
141
|
+
path: ${streamPath}
|
|
142
|
+
data: "no-seq-2"
|
|
143
|
+
expect:
|
|
144
|
+
status: 200
|
|
145
|
+
- action: read
|
|
146
|
+
path: ${streamPath}
|
|
147
|
+
expect:
|
|
148
|
+
data: "no-seq-1no-seq-2"
|