diff --git a/.github/release.yml b/.github/release.yml index 685efdf..3b27fb4 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -15,4 +15,3 @@ changelog: - title: 🚨🚨🚨 Missing Labels - Add labels to the prs listed here and generate the release notes again labels: - "*" - diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a61cc09..8213d95 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -17,7 +17,7 @@ jobs: with: linux_exclude_swift_versions: "[{\"swift_version\": \"5.8\"}]" # since we don't have systemctl, we run the redis server manually in the background - linux_pre_build_command: apt-get update -y && apt-get install redis + linux_pre_build_command: apt-get update -y && apt-get install redis -y linux_env_vars: REDIS_URL=redis linux_build_command: bash -c 'redis-server &; swift test' enable_windows_checks: false diff --git a/Sources/RediStack/ChannelHandlers/RedisPubSubHandler.swift b/Sources/RediStack/ChannelHandlers/RedisPubSubHandler.swift index 1e742bc..52faadc 100644 --- a/Sources/RediStack/ChannelHandlers/RedisPubSubHandler.swift +++ b/Sources/RediStack/ChannelHandlers/RedisPubSubHandler.swift @@ -328,11 +328,14 @@ extension RedisPubSubHandler { guard let latestSubscriptionCount = results .lazy - .reversed() // reverse to save time-complexity, as we just need the last (first) successful value + // reverse to save time-complexity, + // as we just need the last (first) successful value + .reversed() .compactMap({ try? $0.get() }) .first - // if we have no success cases, we will still have at least one response that we can - // rely on the 'get' method to throw the error for us, rather than unwrapping it ourselves + // if we have no success cases, we will still have at least + // one response that we can rely on the 'get' method to + // throw the error for us, rather than unwrapping it ourselves else { return try results.first!.get() } return latestSubscriptionCount diff --git a/Tests/RediStackIntegrationTests/RedisConnectionPoolTests.swift b/Tests/RediStackIntegrationTests/RedisConnectionPoolTests.swift index cdd921b..b78ac32 100644 --- a/Tests/RediStackIntegrationTests/RedisConnectionPoolTests.swift +++ b/Tests/RediStackIntegrationTests/RedisConnectionPoolTests.swift @@ -156,7 +156,9 @@ extension RedisConnectionPoolTests { } } - promises.forEach { $0.succeed(()) } + for promise in promises { + promise.succeed(()) + } _ = try EventLoopFuture .whenAllSucceed(futures, on: pool.eventLoop) .always { _ in