From 91752b7ae651c1ed8dc7efa6a0707e679e2db134 Mon Sep 17 00:00:00 2001 From: consuelita Date: Fri, 22 Mar 2024 14:07:01 -0500 Subject: [PATCH] Update OmniTests.swift --- Tests/OmniTests/OmniTests.swift | 62 --------------------------------- 1 file changed, 62 deletions(-) diff --git a/Tests/OmniTests/OmniTests.swift b/Tests/OmniTests/OmniTests.swift index 829a934..4c05e4d 100644 --- a/Tests/OmniTests/OmniTests.swift +++ b/Tests/OmniTests/OmniTests.swift @@ -142,34 +142,6 @@ final class OmniTests: XCTestCase { } } - func testOmniClientToEchoServerWrite100Times() async - { - do - { - let clientConfigPath = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("OmniClientConfig.json") - let clientMessage = "pass" - let logger = Logger(label: "Omni") - let client = Omni(logger: logger) - - let clientConfig = try OmniClientConfig(path: clientConfigPath.path) - print("☞ Parsed Omni Client config") - - let connection = try await client.connect(config: clientConfig) - print("☞ Omni Client connected to the server.") - - for messageCount in 1...100 - { - try await connection.writeString(string: clientMessage) - print("☞ Omni Client wrote to the server \(messageCount) time/s.") - } - } - catch - { - print("Omni Echo test encountered an error: \(error)") - XCTFail() - } - } - func testOmniClientToEchoServerWriteAndRead100Times() async { do @@ -203,40 +175,6 @@ final class OmniTests: XCTestCase { } } - func testOmniClientToEchoServerWrite100TimesThenRead() async - { - do - { - let clientConfigPath = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("OmniClientConfig.json") - let clientMessage = "pass" - let logger = Logger(label: "Omni") - let client = Omni(logger: logger) - - let clientConfig = try OmniClientConfig(path: clientConfigPath.path) - print("☞ Parsed Omni Client config") - - let connection = try await client.connect(config: clientConfig) - print("☞ Omni Client connected to the server.") - - for messageCount in 1...100 - { - try await Task.sleep(nanoseconds: 1000000) - try await connection.writeString(string: clientMessage) - print("☞ Omni Client wrote to the server \(messageCount) time/s.") - } - - let response = try await connection.read() - print("☞ Omni Client read from the server: \(response.string)") - - XCTAssertEqual(clientMessage, response.string) - } - catch - { - print("Omni Echo test encountered an error: \(error)") - XCTFail() - } - } - func testGenerateConfigs() throws { do