Skip to content

Commit

Permalink
i guess we can’t name it Void?
Browse files Browse the repository at this point in the history
  • Loading branch information
tayloraswift committed Nov 20, 2024
1 parent c536cb9 commit f6dc967
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Sources/MongoClusterTests/ReplicaSets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Testing
struct ReplicaSets
{
final
class Void:Sendable
class Canary:Sendable
{
init() {}
}
Expand Down Expand Up @@ -47,13 +47,13 @@ struct ReplicaSets
@Test
func PrimaryRenameWithoutHint() throws
{
var topology:Mongo.Topology<Void> = .init(from: [self.localhost], hint: nil)
var topology:Mongo.Topology<Canary> = .init(from: [self.localhost], hint: nil)
let update:Mongo.TopologyUpdateResult = topology.combine(
update: .primary(.init(replica: filler, term: .init(
election: .init(0, 0, 0),
version: 1)),
peerlist),
owner: Void.init(),
owner: Canary.init(),
host: self.localhost)
{
_ in
Expand All @@ -80,15 +80,15 @@ struct ReplicaSets
@Test
func PrimaryRenameWithHint() throws
{
var topology:Mongo.Topology<Void> = .init(from: [self.localhost],
var topology:Mongo.Topology<Canary> = .init(from: [self.localhost],
hint: .replicated(set: self.setName))

let update:Mongo.TopologyUpdateResult = topology.combine(
update: .primary(.init(replica: filler, term: .init(
election: .init(0, 0, 0),
version: 1)),
peerlist),
owner: Void.init(),
owner: Canary.init(),
host: self.localhost)
{
_ in
Expand All @@ -115,15 +115,15 @@ struct ReplicaSets
@Test
func GHOSTED() throws
{
var topology:Mongo.Topology<Void> = .init(from: [self.primary],
var topology:Mongo.Topology<Canary> = .init(from: [self.primary],
hint: .replicated(set: self.setName))

let update:Mongo.TopologyUpdateResult = topology.combine(
update: .primary(.init(replica: filler, term: .init(
election: .init(0, 0, 0),
version: 2)),
peerlist),
owner: Void.init(),
owner: Canary.init(),
host: self.primary)
{
_ in
Expand All @@ -136,7 +136,7 @@ struct ReplicaSets
election: .init(0, 0, 0),
version: 1)),
peerlist),
owner: Void.init(),
owner: Canary.init(),
host: self.primary)
{
_ in
Expand Down

0 comments on commit f6dc967

Please sign in to comment.