Changeset: a541b939bb80 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a541b939bb80
Added Files:
sql/test/concurrent/Tests/many-concurrent-client-connections.py
Modified Files:
sql/test/concurrent/Tests/All
Branch: Jan2022
Log Message:
Add concurrent connection test.
diffs (33 lines):
diff --git a/sql/test/concurrent/Tests/All b/sql/test/concurrent/Tests/All
--- a/sql/test/concurrent/Tests/All
+++ b/sql/test/concurrent/Tests/All
@@ -3,3 +3,4 @@ crash_on_concurrent_use.SF-1411926
segments-corruption
read-segment-after-free
smart-segment-merge
+many-concurrent-client-connections
diff --git a/sql/test/concurrent/Tests/many-concurrent-client-connections.py
b/sql/test/concurrent/Tests/many-concurrent-client-connections.py
new file mode 100644
--- /dev/null
+++ b/sql/test/concurrent/Tests/many-concurrent-client-connections.py
@@ -0,0 +1,20 @@
+import os, pymonetdb
+from concurrent.futures import ProcessPoolExecutor
+
+h = os.getenv('MAPIHOST')
+p = int(os.getenv('MAPIPORT'))
+db = os.getenv('TSTDB')
+
+nr_clients = 32
+def client(_):
+ nr_queries = 1000
+ for x in range(0, nr_queries):
+ conn = pymonetdb.connect(hostname=h, port=p,database=db,
autocommit=True)
+ cursor = conn.cursor()
+ cursor.execute("select 1;")
+ cursor.fetchall()
+ conn.close()
+
+
+with ProcessPoolExecutor(nr_clients) as pool:
+ pool.map(client, range(nr_clients))
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]