21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-
+
-
-
-
+
+
+
-
+
|
(define keyvals '(("SYSTEM" "abc")("RELEASE" "def")))
(define header (list "SYSTEM" "RELEASE" "id" "runname" "state" "status" "owner" "event_time"))
(test #f 1 (rmt:register-run keyvals runname "new" "n/a" user))
;; (test #f #f (rmt:get-runs-by-patt keys runname))
(test #f #t (rmt:general-call 'register-test run-id run-id "test-one" ""))
(define test-one-id #f)
(test #f 1 (let ((test-id (rmt:get-test-id run-id "test-one" "")))
(test #f 30001 (let ((test-id (rmt:get-test-id run-id "test-one" "")))
(set! test-one-id test-id)
test-id))
(define test-one-rec #f)
(test #f "test-one" (let ((test-rec (rmt:get-test-info-by-id run-id test-one-id)))
(set! test-one-rec test-rec)
(vector-ref test-rec 2)))
(use trace)
(import trace)
(trace
rmt:send-receive
rmt:open-qry-close-locally
;; (trace
;; rmt:send-receive
;; rmt:open-qry-close-locally
)
;; )
;; Tests to assess reading/writing while servers are starting/stopping
(define start-time (current-seconds))
(let loop ((test-state 'start))
(let* ((server-dats (tasks:get-server-records (db:delay-if-busy (tasks:open-db)) run-id))
(first-dat (if (not (null? server-dats))
(car server-dats)
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
+
|
(server:kind-run run-id)
(loop 'server-started))
((server-started)
(case server-state
((running)
(print "Server appears to be running. Now ask it to shutdown")
(rmt:kill-server run-id)
;; (trace rmt:open-qry-close-locally rmt:send-receive)
(loop 'shutdown-started))
((available)
(loop test-state))
((shutting-down)
(loop test-state))
((no-dat)
(loop test-state))
|