File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Tests/BluetoothLinuxTests Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import Bluetooth
1111import BluetoothHCI
1212import BluetoothGATT
1313import BluetoothGAP
14+ import SystemPackage
1415@testable import BluetoothLinux
1516
1617final class L2CAPTests : XCTestCase {
@@ -49,7 +50,7 @@ final class L2CAPTests: XCTestCase {
4950 while serverSocket. status. accept == false {
5051 try await Task . sleep ( nanoseconds: 10_000 )
5152 if let error = serverSocket. status. error {
52-
53+ throw error
5354 }
5455 }
5556 let newConnection = try serverSocket. accept ( )
@@ -126,5 +127,17 @@ final class L2CAPTests: XCTestCase {
126127 logs. append ( $0)
127128 }
128129 )
130+ try await Task . sleep ( nanoseconds: 100_000 )
131+ do {
132+ while true {
133+ try server. run ( )
134+ }
135+ }
136+ catch {
137+ print ( error)
138+ }
139+ withExtendedLifetime ( server) {
140+ _ = $0
141+ }
129142 }
130143}
You can’t perform that action at this time.
0 commit comments