From a0af03c5347b93b53d60ff09951edbd0c19f36aa Mon Sep 17 00:00:00 2001 From: Nathan Harris Date: Tue, 4 May 2021 09:48:14 -0700 Subject: [PATCH] Get pubsub numpat working This was a cherry-pick of e08b42616be52a9fac37fc4ec65126cca4e5a2ee Only the unit test was needed to be back-ported --- .../Commands/PubSubCommandsTests.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests/RediStackIntegrationTests/Commands/PubSubCommandsTests.swift b/Tests/RediStackIntegrationTests/Commands/PubSubCommandsTests.swift index 8d0468d..fa43272 100644 --- a/Tests/RediStackIntegrationTests/Commands/PubSubCommandsTests.swift +++ b/Tests/RediStackIntegrationTests/Commands/PubSubCommandsTests.swift @@ -189,6 +189,14 @@ final class RedisPubSubCommandsTests: RediStackIntegrationTestCase { self.waitForExpectations(timeout: 1) } + func test_pubSubNumpat() throws { + let queryConnection = try self.makeNewConnection() + defer { try? queryConnection.close().wait() } + + let numPat = try queryConnection.patternSubscriberCount().wait() + XCTAssertGreaterThanOrEqual(numPat, 0) + } + func test_pubSubChannels() throws { let fn = #function let subscriber = try self.makeNewConnection()