From 23af8c6c7be642043995879bf3e3ebbec2aae0f5 Mon Sep 17 00:00:00 2001 From: Luka Rahne Date: Mon, 23 Oct 2023 09:19:01 +0200 Subject: [PATCH] add test for open/close connection - Issue #83 --- test/close_test.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/close_test.dart b/test/close_test.dart index 0c7044c..6a7b1f5 100644 --- a/test/close_test.dart +++ b/test/close_test.dart @@ -20,6 +20,14 @@ main() { await cmd.get_connection().close(); //expect(cmd.send_object("GARBAGE"), throwsA(isRedisError)); }); + + test("Open/Close in loop", () async { + for( int i=0;i<1000;++i) { + Command cmd = await generate_connect(); + await cmd.send_object(["SET", "test", "0"]); + await cmd.get_connection().close(); + } + }); }); }