#lang scheme/base
(require scheme/contract
scheme/pretty
srfi/26/cut
web-server/servlet
(only-in web-server/managers/manager manager?)
web-server/managers/lru
(planet untyped/mirrors/mirrors)
(file "delirium.ss")
(file "all-delirium-tests.ss")
(file "test-base.ss"))
(define interface-version 'v2)
(define (start initial-request)
(make-html-response
(xml (html (head (title "Tests not running"))
(body (p "For some reason the Delirium test suite did not start."))))))
(define (instance-expiration-handler response)
(error "Expired instance!"))
(define manager
(let ([memory-threshold (* 32 1024 1024)])
(create-LRU-manager
instance-expiration-handler 5 (* 30 60) (cut >= (current-memory-use) memory-threshold) #:initial-count 12 #:inform-p void)))
(provide/contract
[interface-version symbol?]
[start (-> request? response?)]
[instance-expiration-handler (-> request? response?)]
[manager manager?])