You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`ClientOptionsBuilder` sets `useBinaryProtocol = false`, so the SDK sends JSON text frames. Every outgoing frame is captured as `MockEvent.MessageFromClient` and queued in `awaitNextMessageFromClient()`.
1.**UTS spec error** (pseudocode itself is wrong): fix the test to match what the spec intends, add a `// NOTE: spec pseudocode had X, corrected to Y` comment.
313
-
2.**Translation error** (you misread the pseudocode): fix silently.
314
-
3.**SDK deviation** (confirmed against `uts/spec/features.md` — SDK does not comply):
315
-
- Wrap the failing assertion in an env gate:
316
-
```kotlin
317
-
if (System.getenv("RUN_DEVIATIONS") !=null) {
318
-
assertEquals(specCorrectValue, actualValue)
319
-
}
320
-
```
321
-
-Add a comment explaining the deviation.
322
-
-Append an entry to `uts/src/test/kotlin/io/ably/lib/deviations.md`:
323
-
-Spec point, what spec requires, what SDK does, which test is affected.
311
+
Handle test failures using this decision tree (see [reference doc](https://github.com/ably/specification/blob/main/uts/docs/writing-derived-tests.md) for full detail):
312
+
313
+
```
314
+
Test fails
315
+
|
316
+
+-- Does UTS spec match features spec?
317
+
| NO → fix test, record UTS spec error in deviations file
318
+
| YES
319
+
| +-- Does test accurately translate the UTS spec?
320
+
| NO → fix the test (no deviation entry needed)
321
+
| YES → SDK deviation — adapt test, record in deviations file
322
+
```
323
+
324
+
### Deviation patterns
325
+
326
+
**Env-gated skip (preferred)** — test contains spec-correct assertions but is skipped by default:
**Never use the accommodate-both pattern** (accept either spec or SDK behaviour). Every test must assert either spec behaviour or the SDK's actual behaviour — never both at once.
349
+
350
+
### Deviations file
351
+
352
+
Append to `uts/src/test/kotlin/io/ably/lib/deviations.md`. Each entry needs:
0 commit comments