summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@fitzsim.org>2022-11-24 02:16:26 -0500
committerThomas Fitzsimmons <fitzsim@fitzsim.org>2022-11-24 02:21:38 -0500
commit4231481af8fbaf895edc0754b4dcf4edc424ae9f (patch)
tree1151262f3c9f54823e8504e811e25603c92ea80e
parent183c66be97c6b809f02cbcacb503a05fb982dabf (diff)
downloademacs-4231481af8fbaf895edc0754b4dcf4edc424ae9f.tar.gz
emacs-4231481af8fbaf895edc0754b4dcf4edc424ae9f.tar.bz2
emacs-4231481af8fbaf895edc0754b4dcf4edc424ae9f.zip
EUDC: Improve LDAP and BBDB tests
* test/lisp/net/eudc-tests.el (eudcb-ldap): Make slapd detection reliable. * test/lisp/net/eudc-resources/bbdb: Add another test contact.
-rw-r--r--test/lisp/net/eudc-resources/bbdb1
-rw-r--r--test/lisp/net/eudc-tests.el7
2 files changed, 7 insertions, 1 deletions
diff --git a/test/lisp/net/eudc-resources/bbdb b/test/lisp/net/eudc-resources/bbdb
index b730bb51cc9..782da56e9f1 100644
--- a/test/lisp/net/eudc-resources/bbdb
+++ b/test/lisp/net/eudc-resources/bbdb
@@ -1,3 +1,4 @@
;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
;;; file-format: 9
["Emacs" "ERT3" nil nil nil nil nil ("emacs-ert-test-3@bbdb.gnu.org") ((notes . " ")) "c8bd3a63-3a83-48a7-a95b-be118a923e00" "2022-11-19 16:36:04 +0000" "2022-11-19 16:36:04 +0000" nil]
+["Emacs" "ERT4" nil nil nil nil nil ("emacs-ert-test-4@bbdb.gnu.org") ((notes . " ")) "5a93c3c5-9270-4e10-8b28-d28cfa2562cf" "2022-11-19 16:47:49 +0000" "2022-11-19 16:47:49 +0000" nil]
diff --git a/test/lisp/net/eudc-tests.el b/test/lisp/net/eudc-tests.el
index 212db65cb26..0da51b7c36e 100644
--- a/test/lisp/net/eudc-tests.el
+++ b/test/lisp/net/eudc-tests.el
@@ -281,7 +281,12 @@ Karl Fogel <kfogel@mail-abbrev.com")))))))))
base "dc=gnu,dc=org" auth simple)))
(eudc-server-hotlist '(("ldap://localhost:3899" . ldap)))
(eudc-ignore-options-file t))
- (sleep-for 1) ; Wait for slapd to start.
+ (catch 'sldapd-up
+ (dotimes (_tries 20)
+ (when (eudc-query-with-words '("emacs-ert-test-1"))
+ (throw 'sldapd-up nil)))
+ (kill-process ldap-process)
+ (error "Failed to confirm slapd is running"))
(should (equal (with-temp-buffer
(insert "emacs-ert-test-1")
(eudc-expand-try-all)