mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-05 04:20:06 +01:00
♻️ Prevent unit tests from running concurrently
The way the testing classes are built with the singletons currently prevents various test structs from being run at the same time. I've adjusted the tests in the PHP Monitor EAP test configuration so that they are not executed concurrently. This does slow down the test suite but prevents odd crashes from individual tests interfering with other tests. It's not an ideal solution and I would like to address this in the future, but I suspect this will be rather cumbersome. Since the app does not actually suffer from this particular issue, this is something worth investigating later.
This commit is contained in:
@@ -9,13 +9,14 @@
|
||||
import Testing
|
||||
import Foundation
|
||||
|
||||
@Suite(.serialized)
|
||||
class PhpConfigurationFileTest {
|
||||
|
||||
static var phpIniFileUrl: URL {
|
||||
return TestBundle.url(forResource: "php", withExtension: "ini")!
|
||||
}
|
||||
|
||||
@Test func can_load_extension() throws {
|
||||
ActiveFileSystem.useSystem()
|
||||
let iniFile = PhpConfigurationFile.from(filePath: Self.phpIniFileUrl.path)
|
||||
|
||||
#expect(iniFile != nil)
|
||||
@@ -23,6 +24,7 @@ class PhpConfigurationFileTest {
|
||||
}
|
||||
|
||||
@Test func can_check_key_existence() throws {
|
||||
print(Self.phpIniFileUrl.path)
|
||||
let iniFile = PhpConfigurationFile.from(filePath: Self.phpIniFileUrl.path)!
|
||||
|
||||
#expect(iniFile.has(key: "error_reporting"))
|
||||
|
||||
Reference in New Issue
Block a user