File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,26 @@ struct GeneratedCommands {
171171 }
172172 }
173173
174+ @Test
175+ func testMultiplexing( ) async throws {
176+ var logger = Logger ( label: " Valkey " )
177+ logger. logLevel = . debug
178+ try await ValkeyClient ( . hostname( valkeyHostname, port: 6379 ) , logger: logger) . withConnection ( logger: logger) { connection in
179+ try await withThrowingTaskGroup ( of: Void . self) { group in
180+ for _ in 0 ..< 100 {
181+ group. addTask {
182+ try await withKey ( connection: connection) { key in
183+ _ = try await connection. set ( key: key, value: key. rawValue)
184+ let response = try await connection. get ( key: key)
185+ #expect( response == key. rawValue)
186+ }
187+ }
188+ }
189+ try await group. waitForAll ( )
190+ }
191+ }
192+ }
193+
174194 /*
175195 @Test
176196 func testSubscriptions() async throws {
You can’t perform that action at this time.
0 commit comments