summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPNTests/LoggingTests.swift10
1 files changed, 6 insertions, 4 deletions
diff --git a/ios/MullvadVPNTests/LoggingTests.swift b/ios/MullvadVPNTests/LoggingTests.swift
index af0a9e857a..ecb782571a 100644
--- a/ios/MullvadVPNTests/LoggingTests.swift
+++ b/ios/MullvadVPNTests/LoggingTests.swift
@@ -37,9 +37,11 @@ class MullvadLoggingTests: XCTestCase {
Logger(label: "test").info(":-P")
- // For some reason, reading the file fails here, despite the file existing. Manual inspection reveals the file to have the correct header. ¯\_(ツ)_/¯
-// let contents = String(decoding: try! Data(contentsOf: fileURL), as: UTF8.self)
-//
-// XCTAssert(contents.hasPrefix(expectedHeader))
+ // Wait for the log file to settle
+ usleep(100000)
+
+ let contents = String(decoding: try! Data(contentsOf: fileURL), as: UTF8.self)
+
+ XCTAssert(contents.hasPrefix(expectedHeader))
}
}