Skip to content

Commit

Permalink
Fix: Fixed weird probe test issue for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
d-exclaimation committed Feb 9, 2022
1 parent 0777fef commit 002b3fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Tests/PioneerTests/ActorTests/ProbeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ final class ProbeTests: XCTestCase {
/// 1. Should be able to dispatch message given a `outgoing` message
/// 2. The result should be in a JSON string format
func testOutgoing() async throws {
let (process, consumer) = consumer()
let (process, con) = consumer()
let probe = try setup()

let message = GraphQLMessage(id: "1", type: "next", payload: ["data": .null, "errors": .array([])])

await probe.outgoing(with: "1", to: process, given: message)

let results = await consumer.waitAll()
let results = await con.waitAll()
print(results)
guard let _ = results.first(where: { $0.contains("\"complete\"") && $0.contains("\"1\"") }) else {
return XCTFail("No completion")
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/PioneerTests/Utils/TestConsumer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import NIOWebSocket
struct TestConsumer: ProcessingConsumer {
var buffer: Buffer = .init()
var group: EventLoopGroup
actor Buffer {
actor Buffer {
var store: [String] = []

func set(_ s: String) async {
Expand Down

0 comments on commit 002b3fd

Please sign in to comment.