fix: Fixes sensor service test that was flaky and moves docker stuff into it's own directory.
Some checks failed
CI / Run Tests (push) Failing after 12s
Some checks failed
CI / Run Tests (push) Failing after 12s
This commit is contained in:
@@ -52,7 +52,16 @@ final class SensorsClientTests: XCTestCase {
|
||||
try await manager.withClient { client in
|
||||
try await client.disconnect()
|
||||
try await client.connect()
|
||||
try await Task.sleep(for: .milliseconds(100))
|
||||
|
||||
while !client.isActive() {
|
||||
try await Task.sleep(for: .milliseconds(100))
|
||||
}
|
||||
|
||||
// Give time to re-subscribe.
|
||||
while !(await sensorsService.isListening) {
|
||||
try await Task.sleep(for: .milliseconds(100))
|
||||
}
|
||||
|
||||
try await client.publish(
|
||||
to: sensor.topics.temperature,
|
||||
payload: ByteBufferAllocator().buffer(string: "25"),
|
||||
|
||||
Reference in New Issue
Block a user