Skip to content

Commit 1d84acf

Browse files
authored
test(macos): remove Swift warning and timing flake (#104434)
1 parent 2d31996 commit 1d84acf

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

apps/macos/Tests/OpenClawIPCTests/ExecApprovalsSocketPathGuardTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ struct ExecApprovalsSocketPathGuardTests {
170170
// old filesystem assertions here flaked on their 0755 default
171171
// (#104019). Creation-with-0700 is covered by the explicit-path
172172
// tests in this suite.
173-
try await TestIsolation.withEnvValues(["OPENCLAW_STATE_DIR": stateDir.path]) {
173+
await TestIsolation.withEnvValues(["OPENCLAW_STATE_DIR": stateDir.path]) {
174174
let socketPath = ExecApprovalsStore.socketPath()
175175
#expect(socketPath == stateDir.appendingPathComponent("exec-approvals.sock").path)
176176
}

apps/macos/Tests/OpenClawIPCTests/ExecApprovalsStoreRefactorTests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,19 +2242,16 @@ extension ExecApprovalsStoreRefactorTests {
22422242
[.modificationDate: Date().addingTimeInterval(-31)],
22432243
ofItemAtPath: lockURL.path)
22442244

2245-
let startedAt = Date()
22462245
let result = ExecApprovalsStore.addAllowlistEntry(
22472246
agentId: "main",
22482247
pattern: "/bin/echo")
2249-
let elapsed = Date().timeIntervalSince(startedAt)
22502248

22512249
guard case .failure(.unavailable) = result else {
22522250
Issue.record("expected lock contention failure")
22532251
return
22542252
}
22552253
#expect(FileManager().fileExists(atPath: lockURL.path))
22562254
#expect(try Data(contentsOf: lockURL) == Data("{".utf8))
2257-
#expect(elapsed < 0.5)
22582255
#expect(ExecApprovalsStore.loadFile().agents?["main"]?.allowlist?.isEmpty != false)
22592256
}
22602257
}

0 commit comments

Comments
 (0)