Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make test function test-aserve-n a little more forgiving

	modified:   test/t-aserve.cl
  test-aserve-n: if n is not positive integer, set n=0
  This allows a normal test run if someone sets
  *do-aserve-test* to t.
  Add some comments.

  Are there user visible changes in this commit?  no

  Is bootstrapping needed?   no

  Are tests included for new features?  no

  Tests run:  t-aserve.cl with various settings of *do-aserve-test*
  • Loading branch information...
commit 2384127b0fdbf494b1582233081f812ea1a26b09 1 parent ee062f5
mm authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 test/t-aserve.cl
View
17 test/t-aserve.cl
@@ -85,8 +85,9 @@
util.test:*error-protect-tests* nil)
-; set to nil before loading the test to prevent the test from auto-running
-; or set to the number of threads/servers to run simultaneously
+; Set to nil before loading the test to prevent the test from auto-running
+; or set to the number of threads/servers to run simultaneously.
+; Default is to run one server in the main thread.
(defvar user::*do-aserve-test* 0)
; if true run timeout test
@@ -94,6 +95,7 @@
(defclass aserve-test-config ()
+ ;; Keep a separate test config for each server.
(
(name :reader asc-name :initarg :name :initform "")
(index :reader asc-index :initarg :index :initform "")
@@ -146,9 +148,16 @@
(direct t) (proxy t) (proxyproxy t) (ssl t)
(name "ast") (log-name nil l-n-p)
&aux wname)
- (setq *aserve-test-configs* (make-array (case n ((nil 0) 1) (t n))))
+ (typecase n
+ ((integer 0) nil)
+ (otherwise
+ ;; In case someone sets *do-aserve-test* to t.
+ (setq n 0)))
+ (setq *aserve-test-configs* (make-array (if (eql n 0) 1 n)))
(case n
- ((nil 0)
+ (0
+ ;; In simple one-thread test, log server name only if requested
+ ;; explicitly.
(if l-n-p
(setq *log-wserver-name* log-name)
(setq *log-wserver-name* nil))
Please sign in to comment.
Something went wrong with that request. Please try again.