We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd0781e commit 3332f4aCopy full SHA for 3332f4a
web-server-test/tests/web-server/serve-tests.rkt
@@ -125,7 +125,12 @@
125
(check-equal? status #"HTTP/1.1 200 OK")
126
(define data-promise
127
(delay/thread
128
- (port->bytes in)))
+ (with-handlers ([(lambda (e)
129
+ (and (exn:fail? e)
130
+ (regexp-match? #rx"input port is closed" (exn-message e))))
131
+ (lambda (_)
132
+ #"")])
133
+ (port->bytes in))))
134
(semaphore-wait started?-sema)
135
(define stop-thds
136
(for/list ([_ (in-range 2)])
@@ -134,9 +139,9 @@
139
(lambda ()
140
(for-each thread-wait stop-thds))
141
0 1 2)
137
- (check-equal?
142
+ (check-match
138
143
(force data-promise)
- #"start\n")))))))
144
+ (or #"" #"start\n"))))))))
145
146
(module+ test
147
(require rackunit/text-ui)
0 commit comments