]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: disable tests throwing copy to executemany in client-side cursors
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 12 May 2022 22:16:13 +0000 (00:16 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 15 May 2022 09:15:30 +0000 (11:15 +0200)
The async one sometimes gets in an allocation loop. On my laptop it gets
OOM'd quickly. On Github Actions it might be the cause of test taking an
unusually long time.

tests/test_client_cursor.py
tests/test_client_cursor_async.py

index c2db78750d1f188f8033bdacd685fa52aaa988ce..e4a308328ae52ce416913de56e76ee969ce25cdb 100644 (file)
@@ -376,7 +376,10 @@ def test_executemany_rowcount_no_hit(conn, execmany):
     "query",
     [
         "insert into nosuchtable values (%s, %s)",
-        "copy (select %s, %s) to stdout",
+        # This fails, but only because we try to copy in pipeline mode,
+        # crashing the connection. Which would be even fine, but with
+        # the async cursor it's worse... See test_client_cursor_async.py.
+        # "copy (select %s, %s) to stdout",
         "wat (%s, %s)",
     ],
 )
index af8307ac94f709ec4ca873ee655dc1bce41a627e..e6981d5d791eaabb007bc6b4b51deab15fa9e9b5 100644 (file)
@@ -368,7 +368,11 @@ async def test_executemany_rowcount_no_hit(aconn, execmany):
     "query",
     [
         "insert into nosuchtable values (%s, %s)",
-        "copy (select %s, %s) to stdout",
+        # This fails because we end up trying to copy in pipeline mode.
+        # However, sometimes (and pretty regularly if we enable pgconn.trace())
+        # something goes in a loop and only terminates by OOM. Strace shows
+        # an allocation loop. I think it's in the libpq.
+        # "copy (select %s, %s) to stdout",
         "wat (%s, %s)",
     ],
 )