Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update duplicate spec points #95

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/AblyChat/DefaultMessages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal final class DefaultMessages: Messages, EmitsDiscontinuities {

// (CHA-M4c) When a realtime message with name set to message.created is received, it is translated into a message event, which contains a type field with the event type as well as a message field containing the Message Struct. This event is then broadcast to all subscribers.
// (CHA-M4d) If a realtime message with an unknown name is received, the SDK shall silently discard the message, though it may log at DEBUG or TRACE level.
// (CHA-M5d) Incoming realtime events that are malformed (unknown field should be ignored) shall not be emitted to subscribers.
// (CHA-M5k) Incoming realtime events that are malformed (unknown field should be ignored) shall not be emitted to subscribers.
channel.subscribe(MessageEvent.created.rawValue) { message in
Task {
// TODO: Revisit errors thrown as part of https://github.com/ably-labs/ably-chat-swift/issues/32
Expand Down
2 changes: 1 addition & 1 deletion Sources/AblyChat/RoomLifecycleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ internal actor RoomLifecycleManager<Contributor: RoomLifecycleContributor> {
break
}

// CHA-RL3c
// CHA-RL3l
lawrence-forooghian marked this conversation as resolved.
Show resolved Hide resolved
changeStatus(to: .releasing(releaseOperationID: operationID))

// CHA-RL3d
Expand Down
4 changes: 2 additions & 2 deletions Tests/AblyChatTests/RoomLifecycleManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ struct RoomLifecycleManagerTests {
#expect(await contributor.channel.detachCallCount == 0)
}

// @specPartial CHA-RL3c - This is marked as specPartial because at time of writing the spec point CHA-RL3c has been accidentally duplicated to specify two separate behaviours. TODO: change this one to @spec once spec fixed (see discussion in https://github.com/ably/specification/pull/200#discussion_r1763770348)
// @spec CHA-RL3c
@Test
func release_whenReleasing() async throws {
// Given: A RoomLifecycleManager with a RELEASE lifecycle operation in progress, and hence in the RELEASING state
Expand Down Expand Up @@ -696,7 +696,7 @@ struct RoomLifecycleManagerTests {
#expect(await contributor.channel.detachCallCount == 1)
}

// @specPartial CHA-RL3c - Haven’t implemented the part that refers to "transient disconnect timeouts"; TODO do this (https://github.com/ably-labs/ably-chat-swift/issues/48)
// @specPartial CHA-RL3l - Haven’t implemented the part that refers to "transient disconnect timeouts"; TODO do this (https://github.com/ably-labs/ably-chat-swift/issues/48)
lawrence-forooghian marked this conversation as resolved.
Show resolved Hide resolved
@Test
func release_transitionsToReleasing() async throws {
// Given: A RoomLifecycleManager, with a contributor on whom calling `detach()` will not complete until after the "Then" part of this test (the motivation for this is to suppress the room from transitioning to RELEASED, so that we can assert its current state as being RELEASING)
Expand Down