Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Nov 14, 2024
1 parent 2f78d78 commit 359a1bf
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Tests/BluetoothLinuxTests/L2CAPTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Bluetooth
import BluetoothHCI
import BluetoothGATT
import BluetoothGAP
import SystemPackage
@testable import BluetoothLinux

final class L2CAPTests: XCTestCase {
Expand Down Expand Up @@ -49,7 +50,7 @@ final class L2CAPTests: XCTestCase {
while serverSocket.status.accept == false {
try await Task.sleep(nanoseconds: 10_000)
if let error = serverSocket.status.error {

throw error
}
}
let newConnection = try serverSocket.accept()
Expand Down Expand Up @@ -126,5 +127,17 @@ final class L2CAPTests: XCTestCase {
logs.append($0)
}
)
try await Task.sleep(nanoseconds: 100_000)
do {
while true {
try server.run()
}
}
catch {
print(error)
}
withExtendedLifetime(server) {
_ = $0
}
}
}

0 comments on commit 359a1bf

Please sign in to comment.