emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pq 37e21db4c2 41/63: Shuffle tests, make gc test emit m


From: ELPA Syncer
Subject: [elpa] externals/pq 37e21db4c2 41/63: Shuffle tests, make gc test emit more info on failure.
Date: Mon, 14 Feb 2022 23:24:26 -0500 (EST)

branch: externals/pq
commit 37e21db4c2c085029c61f2068cd15d3d5320a459
Author: Andreas Seltenreich <seltenreich@gmx.de>
Commit: Andreas Seltenreich <seltenreich@gmx.de>

    Shuffle tests, make gc test emit more info on failure.
---
 test.el | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/test.el b/test.el
index 7cd7809f7d..7b455f8b88 100644
--- a/test.el
+++ b/test.el
@@ -26,7 +26,9 @@
     (should (equal (pq:query conn "select length('(╯°□°)╯︵ ┻━┻')")
                    '(12)))
     (should (equal (pq:query conn "select '(╯°□°)╯' ||$1::text" "︵ ┻━┻")
-                   '("(╯°□°)╯︵ ┻━┻")))))
+                   '("(╯°□°)╯︵ ┻━┻")))
+    (should-error (pq:query conn "select $1::text" "\x80"))
+    (should-error (pq:query conn "select text '\x80'"))))
 
 (ert-deftest pq-escape-test ()
   (let ((conn (pq:connectdb *conninfo*)))
@@ -43,17 +45,17 @@
          conn (pq:connectdb *conninfo*)
          conn (pq:connectdb *conninfo*))
     (should
-     (equal
-      (pq:query conn
-               "select count(1) > 5 from pg_stat_activity where 
application_name = 'emacs'")
-      '(t)))
-    (sit-for 0.5)
+     (>
+      (car (pq:query conn
+                       "select count(1) from pg_stat_activity where 
application_name = 'emacs'"))
+      6))
+    (sleep-for 0.1)
     (garbage-collect)
     (should
-     (equal
-      (pq:query conn
-               "select count(1) < 5 from pg_stat_activity where 
application_name = 'emacs'")
-      '(t)))))
+     (<
+      (car (pq:query conn
+                       "select count(1) from pg_stat_activity where 
application_name = 'emacs'"))
+      6))))
 
 (ert-deftest pq-signal-error-test ()
   (should-error (pq:connectdb "invalid-conninfo"))
@@ -61,9 +63,7 @@
     (pq:query conn "select 1")
     (should-error (pq:query "select * from"))
     (should-error (pq:query conn "select * from"))
-    (should-error (pq:query conn "select $1::text"))
-    (should-error (pq:query conn "select $1::text" "\x80"))
-    (should-error (pq:query conn "select text '\x80'"))))
+    (should-error (pq:query conn "select $1::text"))))
 
 (ert-deftest pq-notice-receiver-test ()
   (let ((conn (pq:connectdb *conninfo*)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]