feat: Prep for moving tests into single integration suite
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,3 +10,5 @@ DerivedData/
|
|||||||
mqtt_password.txt
|
mqtt_password.txt
|
||||||
.env
|
.env
|
||||||
.smbdelete*
|
.smbdelete*
|
||||||
|
buildServer.json
|
||||||
|
.nvim/*
|
||||||
|
|||||||
35
.swiftpm/dewpoint-controller-Package.xctestplan
Normal file
35
.swiftpm/dewpoint-controller-Package.xctestplan
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"configurations" : [
|
||||||
|
{
|
||||||
|
"id" : "AFB1047B-4742-43D2-AFB9-680C1CB2D273",
|
||||||
|
"name" : "Test Scheme Action",
|
||||||
|
"options" : {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"defaultOptions" : {
|
||||||
|
"targetForVariableExpansion" : {
|
||||||
|
"containerPath" : "container:",
|
||||||
|
"identifier" : "dewpoint-controller",
|
||||||
|
"name" : "dewpoint-controller"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"testTargets" : [
|
||||||
|
{
|
||||||
|
"target" : {
|
||||||
|
"containerPath" : "container:",
|
||||||
|
"identifier" : "MQTTConnectionServiceTests",
|
||||||
|
"name" : "MQTTConnectionServiceTests"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target" : {
|
||||||
|
"containerPath" : "container:",
|
||||||
|
"identifier" : "SensorsServiceTests",
|
||||||
|
"name" : "SensorsServiceTests"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Scheme
|
|
||||||
LastUpgradeVersion = "1330"
|
|
||||||
version = "1.3">
|
|
||||||
<BuildAction
|
|
||||||
parallelizeBuildables = "YES"
|
|
||||||
buildImplicitDependencies = "YES">
|
|
||||||
<BuildActionEntries>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "DewPointEnvironment"
|
|
||||||
BuildableName = "DewPointEnvironment"
|
|
||||||
BlueprintName = "DewPointEnvironment"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
</BuildActionEntries>
|
|
||||||
</BuildAction>
|
|
||||||
<TestAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
||||||
<Testables>
|
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
|
||||||
<LaunchAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
launchStyle = "0"
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
|
||||||
debugDocumentVersioning = "YES"
|
|
||||||
debugServiceExtension = "internal"
|
|
||||||
allowLocationSimulation = "YES">
|
|
||||||
</LaunchAction>
|
|
||||||
<ProfileAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
||||||
savedToolIdentifier = ""
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
debugDocumentVersioning = "YES">
|
|
||||||
<MacroExpansion>
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "DewPointEnvironment"
|
|
||||||
BuildableName = "DewPointEnvironment"
|
|
||||||
BlueprintName = "DewPointEnvironment"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</MacroExpansion>
|
|
||||||
</ProfileAction>
|
|
||||||
<AnalyzeAction
|
|
||||||
buildConfiguration = "Debug">
|
|
||||||
</AnalyzeAction>
|
|
||||||
<ArchiveAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
revealArchiveInOrganizer = "YES">
|
|
||||||
</ArchiveAction>
|
|
||||||
</Scheme>
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Scheme
|
|
||||||
LastUpgradeVersion = "1330"
|
|
||||||
version = "1.3">
|
|
||||||
<BuildAction
|
|
||||||
parallelizeBuildables = "YES"
|
|
||||||
buildImplicitDependencies = "YES">
|
|
||||||
<BuildActionEntries>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "EnvVars"
|
|
||||||
BuildableName = "EnvVars"
|
|
||||||
BlueprintName = "EnvVars"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
</BuildActionEntries>
|
|
||||||
</BuildAction>
|
|
||||||
<TestAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
||||||
<Testables>
|
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
|
||||||
<LaunchAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
launchStyle = "0"
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
|
||||||
debugDocumentVersioning = "YES"
|
|
||||||
debugServiceExtension = "internal"
|
|
||||||
allowLocationSimulation = "YES">
|
|
||||||
</LaunchAction>
|
|
||||||
<ProfileAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
||||||
savedToolIdentifier = ""
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
debugDocumentVersioning = "YES">
|
|
||||||
<MacroExpansion>
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "EnvVars"
|
|
||||||
BuildableName = "EnvVars"
|
|
||||||
BlueprintName = "EnvVars"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</MacroExpansion>
|
|
||||||
</ProfileAction>
|
|
||||||
<AnalyzeAction
|
|
||||||
buildConfiguration = "Debug">
|
|
||||||
</AnalyzeAction>
|
|
||||||
<ArchiveAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
revealArchiveInOrganizer = "YES">
|
|
||||||
</ArchiveAction>
|
|
||||||
</Scheme>
|
|
||||||
24
.swiftpm/xcode/xcshareddata/xcschemes/ClientLive.xcscheme → .swiftpm/xcode/xcshareddata/xcschemes/MQTTConnectionService.xcscheme
Executable file → Normal file
24
.swiftpm/xcode/xcshareddata/xcschemes/ClientLive.xcscheme → .swiftpm/xcode/xcshareddata/xcschemes/MQTTConnectionService.xcscheme
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1330"
|
LastUpgradeVersion = "1610"
|
||||||
version = "1.3">
|
version = "1.7">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
@@ -14,9 +15,9 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "ClientLive"
|
BlueprintIdentifier = "MQTTConnectionService"
|
||||||
BuildableName = "ClientLive"
|
BuildableName = "MQTTConnectionService"
|
||||||
BlueprintName = "ClientLive"
|
BlueprintName = "MQTTConnectionService"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -26,9 +27,8 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
<Testables>
|
shouldAutocreateTestPlan = "YES">
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "ClientLive"
|
BlueprintIdentifier = "MQTTConnectionService"
|
||||||
BuildableName = "ClientLive"
|
BuildableName = "MQTTConnectionService"
|
||||||
BlueprintName = "ClientLive"
|
BlueprintName = "MQTTConnectionService"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
24
.swiftpm/xcode/xcshareddata/xcschemes/Bootstrap.xcscheme → .swiftpm/xcode/xcshareddata/xcschemes/MQTTManager.xcscheme
Executable file → Normal file
24
.swiftpm/xcode/xcshareddata/xcschemes/Bootstrap.xcscheme → .swiftpm/xcode/xcshareddata/xcschemes/MQTTManager.xcscheme
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1330"
|
LastUpgradeVersion = "1610"
|
||||||
version = "1.3">
|
version = "1.7">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
@@ -14,9 +15,9 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "Bootstrap"
|
BlueprintIdentifier = "MQTTManager"
|
||||||
BuildableName = "Bootstrap"
|
BuildableName = "MQTTManager"
|
||||||
BlueprintName = "Bootstrap"
|
BlueprintName = "MQTTManager"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -26,9 +27,8 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
<Testables>
|
shouldAutocreateTestPlan = "YES">
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "Bootstrap"
|
BlueprintIdentifier = "MQTTManager"
|
||||||
BuildableName = "Bootstrap"
|
BuildableName = "MQTTManager"
|
||||||
BlueprintName = "Bootstrap"
|
BlueprintName = "MQTTManager"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
24
.swiftpm/xcode/xcshareddata/xcschemes/Client.xcscheme → .swiftpm/xcode/xcshareddata/xcschemes/SensorsService.xcscheme
Executable file → Normal file
24
.swiftpm/xcode/xcshareddata/xcschemes/Client.xcscheme → .swiftpm/xcode/xcshareddata/xcschemes/SensorsService.xcscheme
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1330"
|
LastUpgradeVersion = "1610"
|
||||||
version = "1.3">
|
version = "1.7">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
@@ -14,9 +15,9 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "Client"
|
BlueprintIdentifier = "SensorsService"
|
||||||
BuildableName = "Client"
|
BuildableName = "SensorsService"
|
||||||
BlueprintName = "Client"
|
BlueprintName = "SensorsService"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -26,9 +27,8 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
<Testables>
|
shouldAutocreateTestPlan = "YES">
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "Client"
|
BlueprintIdentifier = "SensorsService"
|
||||||
BuildableName = "Client"
|
BuildableName = "SensorsService"
|
||||||
BlueprintName = "Client"
|
BlueprintName = "SensorsService"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
169
.swiftpm/xcode/xcshareddata/xcschemes/dewPoint-controller-Package.xcscheme
Executable file → Normal file
169
.swiftpm/xcode/xcshareddata/xcschemes/dewPoint-controller-Package.xcscheme
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1330"
|
LastUpgradeVersion = "1610"
|
||||||
version = "1.3">
|
version = "1.7">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
@@ -14,9 +15,9 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "Bootstrap"
|
BlueprintIdentifier = "MQTTConnectionService"
|
||||||
BuildableName = "Bootstrap"
|
BuildableName = "MQTTConnectionService"
|
||||||
BlueprintName = "Bootstrap"
|
BlueprintName = "MQTTConnectionService"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -28,51 +29,9 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "Client"
|
BlueprintIdentifier = "MQTTManager"
|
||||||
BuildableName = "Client"
|
BuildableName = "MQTTManager"
|
||||||
BlueprintName = "Client"
|
BlueprintName = "MQTTManager"
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "ClientLive"
|
|
||||||
BuildableName = "ClientLive"
|
|
||||||
BlueprintName = "ClientLive"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "DewPointEnvironment"
|
|
||||||
BuildableName = "DewPointEnvironment"
|
|
||||||
BlueprintName = "DewPointEnvironment"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "EnvVars"
|
|
||||||
BuildableName = "EnvVars"
|
|
||||||
BlueprintName = "EnvVars"
|
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -90,62 +49,6 @@
|
|||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "dewPoint-controller"
|
|
||||||
BuildableName = "dewPoint-controller"
|
|
||||||
BlueprintName = "dewPoint-controller"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "NO"
|
|
||||||
buildForArchiving = "NO"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "ClientTests"
|
|
||||||
BuildableName = "ClientTests"
|
|
||||||
BlueprintName = "ClientTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "NO"
|
|
||||||
buildForArchiving = "NO"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "dewPoint-controllerTests"
|
|
||||||
BuildableName = "dewPoint-controllerTests"
|
|
||||||
BlueprintName = "dewPoint-controllerTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "TopicsLive"
|
|
||||||
BuildableName = "TopicsLive"
|
|
||||||
BlueprintName = "TopicsLive"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
buildForRunning = "YES"
|
buildForRunning = "YES"
|
||||||
@@ -160,6 +63,20 @@
|
|||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "dewpoint-controller"
|
||||||
|
BuildableName = "dewpoint-controller"
|
||||||
|
BlueprintName = "dewpoint-controller"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
</BuildAction>
|
</BuildAction>
|
||||||
<TestAction
|
<TestAction
|
||||||
@@ -167,27 +84,13 @@
|
|||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<TestPlans>
|
||||||
|
<TestPlanReference
|
||||||
|
reference = "container:.swiftpm/dewpoint-controller-Package.xctestplan"
|
||||||
|
default = "YES">
|
||||||
|
</TestPlanReference>
|
||||||
|
</TestPlans>
|
||||||
<Testables>
|
<Testables>
|
||||||
<TestableReference
|
|
||||||
skipped = "NO">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "ClientTests"
|
|
||||||
BuildableName = "ClientTests"
|
|
||||||
BlueprintName = "ClientTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
<TestableReference
|
|
||||||
skipped = "NO">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "dewPoint-controllerTests"
|
|
||||||
BuildableName = "dewPoint-controllerTests"
|
|
||||||
BlueprintName = "dewPoint-controllerTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
<TestableReference
|
<TestableReference
|
||||||
skipped = "NO">
|
skipped = "NO">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
@@ -223,9 +126,9 @@
|
|||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "dewPoint-controller"
|
BlueprintIdentifier = "dewpoint-controller"
|
||||||
BuildableName = "dewPoint-controller"
|
BuildableName = "dewpoint-controller"
|
||||||
BlueprintName = "dewPoint-controller"
|
BlueprintName = "dewpoint-controller"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
@@ -239,9 +142,9 @@
|
|||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "dewPoint-controller"
|
BlueprintIdentifier = "dewpoint-controller"
|
||||||
BuildableName = "dewPoint-controller"
|
BuildableName = "dewpoint-controller"
|
||||||
BlueprintName = "dewPoint-controller"
|
BlueprintName = "dewpoint-controller"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
|
|||||||
78
.swiftpm/xcode/xcshareddata/xcschemes/dewPoint-controller.xcscheme
Executable file → Normal file
78
.swiftpm/xcode/xcshareddata/xcschemes/dewPoint-controller.xcscheme
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1330"
|
LastUpgradeVersion = "1610"
|
||||||
version = "1.3">
|
version = "1.7">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
@@ -14,37 +15,9 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "dewPoint-controller"
|
BlueprintIdentifier = "dewpoint-controller"
|
||||||
BuildableName = "dewPoint-controller"
|
BuildableName = "dewpoint-controller"
|
||||||
BlueprintName = "dewPoint-controller"
|
BlueprintName = "dewpoint-controller"
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "NO"
|
|
||||||
buildForArchiving = "NO"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "ClientTests"
|
|
||||||
BuildableName = "ClientTests"
|
|
||||||
BlueprintName = "ClientTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "NO"
|
|
||||||
buildForArchiving = "NO"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "dewPoint-controllerTests"
|
|
||||||
BuildableName = "dewPoint-controllerTests"
|
|
||||||
BlueprintName = "dewPoint-controllerTests"
|
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -54,29 +27,8 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
<Testables>
|
shouldAutocreateTestPlan = "YES">
|
||||||
<TestableReference
|
|
||||||
skipped = "NO">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "ClientTests"
|
|
||||||
BuildableName = "ClientTests"
|
|
||||||
BlueprintName = "ClientTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
<TestableReference
|
|
||||||
skipped = "NO">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "dewPoint-controllerTests"
|
|
||||||
BuildableName = "dewPoint-controllerTests"
|
|
||||||
BlueprintName = "dewPoint-controllerTests"
|
|
||||||
ReferencedContainer = "container:">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -92,9 +44,9 @@
|
|||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "dewPoint-controller"
|
BlueprintIdentifier = "dewpoint-controller"
|
||||||
BuildableName = "dewPoint-controller"
|
BuildableName = "dewpoint-controller"
|
||||||
BlueprintName = "dewPoint-controller"
|
BlueprintName = "dewpoint-controller"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
@@ -109,9 +61,9 @@
|
|||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "dewPoint-controller"
|
BlueprintIdentifier = "dewpoint-controller"
|
||||||
BuildableName = "dewPoint-controller"
|
BuildableName = "dewpoint-controller"
|
||||||
BlueprintName = "dewPoint-controller"
|
BlueprintName = "dewpoint-controller"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -20,3 +20,10 @@ test-docker:
|
|||||||
@docker compose --file docker/docker-compose-test.yaml \
|
@docker compose --file docker/docker-compose-test.yaml \
|
||||||
run --build --remove-orphans -i --rm test
|
run --build --remove-orphans -i --rm test
|
||||||
@docker compose --file docker/docker-compose-test.yaml down
|
@docker compose --file docker/docker-compose-test.yaml down
|
||||||
|
|
||||||
|
start-mosquitto:
|
||||||
|
@docker compose --file docker/docker-compose.yaml \
|
||||||
|
up -d mosquitto
|
||||||
|
|
||||||
|
test-swift: start-mosquitto
|
||||||
|
@swift test --enable-code-coverage
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ let package = Package(
|
|||||||
dependencies: [
|
dependencies: [
|
||||||
"MQTTConnectionService",
|
"MQTTConnectionService",
|
||||||
"MQTTManager",
|
"MQTTManager",
|
||||||
|
.product(name: "PsychrometricClientLive", package: "swift-psychrometrics"),
|
||||||
.product(name: "ServiceLifecycleTestKit", package: "swift-service-lifecycle")
|
.product(name: "ServiceLifecycleTestKit", package: "swift-service-lifecycle")
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@@ -84,6 +85,7 @@ let package = Package(
|
|||||||
.product(name: "Dependencies", package: "swift-dependencies"),
|
.product(name: "Dependencies", package: "swift-dependencies"),
|
||||||
.product(name: "DependenciesMacros", package: "swift-dependencies"),
|
.product(name: "DependenciesMacros", package: "swift-dependencies"),
|
||||||
.product(name: "MQTTNIO", package: "mqtt-nio"),
|
.product(name: "MQTTNIO", package: "mqtt-nio"),
|
||||||
|
.product(name: "PsychrometricClient", package: "swift-psychrometrics"),
|
||||||
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle")
|
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle")
|
||||||
],
|
],
|
||||||
swiftSettings: swiftSettings
|
swiftSettings: swiftSettings
|
||||||
|
|||||||
@@ -19,19 +19,22 @@ public struct MQTTConnectionService: Service {
|
|||||||
/// to the MQTT broker and handles graceful shutdown of the
|
/// to the MQTT broker and handles graceful shutdown of the
|
||||||
/// connection.
|
/// connection.
|
||||||
public func run() async throws {
|
public func run() async throws {
|
||||||
|
try await mqtt.connect()
|
||||||
|
|
||||||
try await withGracefulShutdownHandler {
|
try await withGracefulShutdownHandler {
|
||||||
try await mqtt.connect()
|
|
||||||
for await event in try mqtt.connectionStream().cancelOnGracefulShutdown() {
|
for await event in try mqtt.connectionStream().cancelOnGracefulShutdown() {
|
||||||
// We don't really need to do anything with the events, so just logging
|
// We don't really need to do anything with the events, so just logging
|
||||||
// for now. But we need to iterate on an async stream for the service to
|
// for now. But we need to iterate on an async stream for the service to
|
||||||
// continue to run and handle graceful shutdowns.
|
// continue to run and handle graceful shutdowns.
|
||||||
logger?.trace("Received connection event: \(event)")
|
logger?.trace("Received connection event: \(event)")
|
||||||
}
|
}
|
||||||
// when we reach here we are shutting down, so we shutdown
|
|
||||||
// the manager.
|
|
||||||
mqtt.shutdown()
|
|
||||||
} onGracefulShutdown: {
|
} onGracefulShutdown: {
|
||||||
self.logger?.trace("Received graceful shutdown.")
|
self.logger?.trace("Received graceful shutdown.")
|
||||||
|
shutdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func shutdown() {
|
||||||
|
mqtt.shutdown()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ public extension MQTTManager {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
shutdown: {
|
shutdown: {
|
||||||
|
Task { try await client.shutdown() }
|
||||||
manager.shutdown()
|
manager.shutdown()
|
||||||
},
|
},
|
||||||
_withClient: { callback in
|
_withClient: { callback in
|
||||||
|
|||||||
@@ -1,24 +1,60 @@
|
|||||||
import AsyncAlgorithms
|
import Dependencies
|
||||||
import Logging
|
import Logging
|
||||||
import Models
|
import Models
|
||||||
import MQTTConnectionService
|
import MQTTConnectionService
|
||||||
@_spi(Internal) import MQTTManager
|
@_spi(Internal) import MQTTManager
|
||||||
import MQTTNIO
|
import MQTTNIO
|
||||||
import NIO
|
import NIO
|
||||||
|
import PsychrometricClientLive
|
||||||
import ServiceLifecycle
|
import ServiceLifecycle
|
||||||
import ServiceLifecycleTestKit
|
import ServiceLifecycleTestKit
|
||||||
import XCTest
|
import XCTest
|
||||||
|
|
||||||
|
// TODO: Rename to integration test when other tests are moved.
|
||||||
final class MQTTConnectionServiceTests: XCTestCase {
|
final class MQTTConnectionServiceTests: XCTestCase {
|
||||||
|
|
||||||
static let hostname = ProcessInfo.processInfo.environment["MOSQUITTO_SERVER"] ?? "localhost"
|
static let hostname = ProcessInfo.processInfo.environment["MOSQUITTO_SERVER"] ?? "localhost"
|
||||||
|
|
||||||
static let logger: Logger = {
|
static let logger: Logger = {
|
||||||
var logger = Logger(label: "MQTTConnectionServiceTests")
|
var logger = Logger(label: "MQTTConnectionServiceTests")
|
||||||
logger.logLevel = .trace
|
logger.logLevel = .info
|
||||||
return logger
|
return logger
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
override func invokeTest() {
|
||||||
|
let client = createClient(identifier: "\(Self.self)")
|
||||||
|
|
||||||
|
withDependencies {
|
||||||
|
$0.mqtt = .live(client: client, logger: Self.logger)
|
||||||
|
$0.psychrometricClient = PsychrometricClient.liveValue
|
||||||
|
} operation: {
|
||||||
|
super.invokeTest()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testConnectionServiceShutdown() async throws {
|
||||||
|
@Dependency(\.mqtt) var mqtt
|
||||||
|
|
||||||
|
let service = MQTTConnectionService(logger: Self.logger)
|
||||||
|
let task = Task { try await service.run() }
|
||||||
|
defer { task.cancel() }
|
||||||
|
|
||||||
|
try await Task.sleep(for: .milliseconds(200))
|
||||||
|
|
||||||
|
// check the connection is active here.
|
||||||
|
try await mqtt.withClient { client in
|
||||||
|
XCTAssert(client.isActive())
|
||||||
|
}
|
||||||
|
service.shutdown()
|
||||||
|
|
||||||
|
try await Task.sleep(for: .milliseconds(500))
|
||||||
|
|
||||||
|
// check the connection is active here.
|
||||||
|
try await mqtt.withClient { client in
|
||||||
|
XCTAssertFalse(client.isActive())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Move to integration tests.
|
// TODO: Move to integration tests.
|
||||||
func testMQTTConnectionStream() async throws {
|
func testMQTTConnectionStream() async throws {
|
||||||
let client = createClient(identifier: "testNonManagedStream")
|
let client = createClient(identifier: "testNonManagedStream")
|
||||||
@@ -43,11 +79,10 @@ final class MQTTConnectionServiceTests: XCTestCase {
|
|||||||
try await Task.sleep(for: .milliseconds(100))
|
try await Task.sleep(for: .milliseconds(100))
|
||||||
}
|
}
|
||||||
try await Task.sleep(for: .milliseconds(200))
|
try await Task.sleep(for: .milliseconds(200))
|
||||||
manager.shutdown()
|
|
||||||
try await client.disconnect()
|
try await client.disconnect()
|
||||||
try await Task.sleep(for: .seconds(1))
|
try await Task.sleep(for: .milliseconds(500))
|
||||||
try await client.shutdown()
|
manager.shutdown()
|
||||||
try await Task.sleep(for: .seconds(1))
|
try await Task.sleep(for: .milliseconds(500))
|
||||||
connectionStream1.stop()
|
connectionStream1.stop()
|
||||||
connectionStream2.stop()
|
connectionStream2.stop()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user