Skip to content
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/DistributedActors/Cluster/ClusterShell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ internal class ClusterShell {
}

guard let removedAssociation = removedAssociationOption else {
system.log.warning("Attempted to terminate non-existing association [\(reflecting: remoteNode)].")
system.log.debug("Attempted to terminate non-existing association [\(reflecting: remoteNode)].")
return
}

Expand Down
16 changes: 10 additions & 6 deletions Sources/DistributedActorsTestKit/TestProbes+Receptionist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ extension ActorTestProbe where Message == Receptionist.Listing<String> {
expected: Set<ActorRef<String>>, within timeout: TimeAmount,
file: StaticString = #file, line: UInt = #line, column: UInt = #column
) throws {
let listing = try self.fishForMessages(within: timeout, file: file, line: line) {
if $0.refs.count == expected.count { return .catchComplete }
else { return .ignore }
}.first!
do {
let listing = try self.fishForMessages(within: timeout, file: file, line: line) {
if $0.refs.count == expected.count { return .catchComplete }
else { return .ignore }
}.first!

// TODO: not super efficient, rework eventually
listing.refs.map { $0.path }.sorted().shouldEqual(expected.map { $0.address.path }.sorted(), file: file, line: line, column: column)
// TODO: not super efficient, rework eventually
listing.refs.map { $0.path }.sorted().shouldEqual(expected.map { $0.address.path }.sorted(), file: file, line: line, column: column)
} catch {
throw self.error("Expected \(expected), error: \(error)", file: file, line: line)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ final class OpLogClusterReceptionistClusteredTests: ClusteredNodesTestBase {
try p2.eventuallyExpectListing(expected: [firstRef, secondRef], within: .seconds(3))

// crash the second node
second.shutdown()
second.shutdown().wait()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes the waiting for the down -> removal from reception a bit less racy


// it should be removed from all listings; on both nodes, for all keys
try p1.eventuallyExpectListing(expected: [firstRef], within: .seconds(5))
Expand Down