@durable-streams/client-conformance-tests 0.2.0 → 0.2.2

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.
@@ -17,6 +17,7 @@ tests:
17
17
  setup:
18
18
  - action: create
19
19
  as: streamPath
20
+ contentType: text/plain
20
21
  - action: append
21
22
  path: ${streamPath}
22
23
  data: "existing1"
@@ -41,6 +42,7 @@ tests:
41
42
  setup:
42
43
  - action: create
43
44
  as: streamPath
45
+ contentType: text/plain
44
46
  - action: append
45
47
  path: ${streamPath}
46
48
  data: "initial"
@@ -76,6 +78,7 @@ tests:
76
78
  setup:
77
79
  - action: create
78
80
  as: streamPath
81
+ contentType: text/plain
79
82
  - action: append
80
83
  path: ${streamPath}
81
84
  data: "skip-this"
@@ -99,6 +102,7 @@ tests:
99
102
  setup:
100
103
  - action: create
101
104
  as: streamPath
105
+ contentType: text/plain
102
106
  - action: append
103
107
  path: ${streamPath}
104
108
  data: "data"
@@ -116,6 +120,7 @@ tests:
116
120
  setup:
117
121
  - action: create
118
122
  as: streamPath
123
+ contentType: text/plain
119
124
  operations:
120
125
  - action: read
121
126
  path: ${streamPath}
@@ -125,9 +130,61 @@ tests:
125
130
  upToDate: true
126
131
  chunkCount: 0
127
132
 
133
+ - id: sse-json-empty-stream
134
+ name: SSE on empty JSON stream
135
+ description: SSE JSON mode should handle empty streams without stalling
136
+ requiredFeatures: [json]
137
+ setup:
138
+ - action: create
139
+ as: streamPath
140
+ contentType: application/json
141
+ operations:
142
+ - action: read
143
+ path: ${streamPath}
144
+ live: sse
145
+ waitForUpToDate: true
146
+ expect:
147
+ upToDate: true
148
+ chunkCount: 0
149
+
150
+ - id: sse-json-receives-new-data-after-empty-catchup
151
+ name: SSE JSON receives new data after initial empty catch-up
152
+ description: |
153
+ In JSON mode, reading from tail may first produce an empty catch-up batch.
154
+ Client must continue and receive subsequent appended JSON data.
155
+ requiredFeatures: [json]
156
+ setup:
157
+ - action: create
158
+ as: streamPath
159
+ contentType: application/json
160
+ - action: append
161
+ path: ${streamPath}
162
+ json: { id: 0 }
163
+ expect:
164
+ storeOffsetAs: tailOffset
165
+ operations:
166
+ - action: read
167
+ path: ${streamPath}
168
+ offset: ${tailOffset}
169
+ live: sse
170
+ maxChunks: 1
171
+ timeoutMs: 10000
172
+ background: true
173
+ as: readOp
174
+ - action: wait
175
+ ms: 200
176
+ - action: server-append
177
+ path: ${streamPath}
178
+ data: '{"id":1}'
179
+ - action: await
180
+ ref: readOp
181
+ expect:
182
+ dataContains: '"id":1'
183
+ minChunks: 1
184
+
128
185
  - id: sse-binary-data
129
186
  name: SSE with binary data
130
- description: SSE should correctly transmit binary data
187
+ description: SSE should correctly transmit binary data with auto-detected base64 encoding
131
188
  setup:
132
189
  - action: create
133
190
  as: streamPath
@@ -17,6 +17,7 @@ tests:
17
17
  setup:
18
18
  - action: create
19
19
  as: streamPath
20
+ contentType: text/plain
20
21
  - action: append
21
22
  path: ${streamPath}
22
23
  data: "test-data"
@@ -44,6 +45,7 @@ tests:
44
45
  setup:
45
46
  - action: create
46
47
  as: streamPath
48
+ contentType: text/plain
47
49
  - action: append
48
50
  path: ${streamPath}
49
51
  data: "data-before-error"
@@ -71,6 +73,7 @@ tests:
71
73
  setup:
72
74
  - action: create
73
75
  as: streamPath
76
+ contentType: text/plain
74
77
  - action: append
75
78
  path: ${streamPath}
76
79
  data: "actual-data"
@@ -98,6 +101,7 @@ tests:
98
101
  setup:
99
102
  - action: create
100
103
  as: streamPath
104
+ contentType: text/plain
101
105
  - action: append
102
106
  path: ${streamPath}
103
107
  data: "expected-data"
@@ -15,6 +15,7 @@ tests:
15
15
  setup:
16
16
  - action: create
17
17
  as: streamPath
18
+ contentType: text/plain
18
19
  - action: append
19
20
  path: ${streamPath}
20
21
  data: "chunk1"
@@ -55,6 +56,7 @@ tests:
55
56
  setup:
56
57
  - action: create
57
58
  as: streamPath
59
+ contentType: text/plain
58
60
  - action: append
59
61
  path: ${streamPath}
60
62
  data: "before"
@@ -89,6 +91,7 @@ tests:
89
91
  setup:
90
92
  - action: create
91
93
  as: streamPath
94
+ contentType: text/plain
92
95
  operations:
93
96
  # Read empty stream with long-poll
94
97
  - action: read
@@ -116,6 +119,7 @@ tests:
116
119
  setup:
117
120
  - action: create
118
121
  as: streamPath
122
+ contentType: text/plain
119
123
  - action: append
120
124
  path: ${streamPath}
121
125
  data: "initial"
@@ -148,6 +152,7 @@ tests:
148
152
  setup:
149
153
  - action: create
150
154
  as: streamPath
155
+ contentType: text/plain
151
156
  - action: append
152
157
  path: ${streamPath}
153
158
  data: "initial"
@@ -178,6 +183,7 @@ tests:
178
183
  setup:
179
184
  - action: create
180
185
  as: streamPath
186
+ contentType: text/plain
181
187
  - action: append
182
188
  path: ${streamPath}
183
189
  data: "a"