Get pubsub numpat working

This was a cherry-pick of e08b42616b

Only the unit test was needed to be back-ported
This commit is contained in:
Nathan Harris
2021-05-04 09:48:14 -07:00
parent 5f758ba866
commit a0af03c534
@@ -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()