+USING: accessors calendar classes
+concurrency.promises destructors io io.backend.unix
+io.encodings.ascii io.sockets io.sockets.secure
+io.sockets.secure.debug io.streams.duplex io.timeouts kernel
+locals namespaces threads tools.test ;
 IN: io.sockets.secure.tests
-USING: accessors kernel namespaces io io.sockets
-io.sockets.secure io.encodings.ascii io.streams.duplex
-io.backend.unix classes words destructors threads tools.test
-concurrency.promises byte-arrays locals calendar io.timeouts
-io.sockets.secure.debug ;
+QUALIFIED-WITH: concurrency.messaging qm
 
 { 1 0 } [ [ ] with-secure-context ] must-infer-as
 
 { } [ <promise> "port" set ] unit-test
 
-:: server-test ( quot -- )
+:: server-test ( quot -- obj/f )
     [
         [
             "127.0.0.1" 0 <inet4> f <secure> ascii <server> [

{ } [
    [
        [
            "127.0.0.1" "port" get ?promise
            <inet4> ascii <client> drop &dispose 1 minutes sleep
        ] with-destructors
    ] "Silly client" spawn drop

    [
        1 seconds secure-socket-timeout [
            <secure-config> [
                "127.0.0.1" "port" get ?promise-test <inet4> f <secure>
                ascii <client> drop dispose
            ] with-secure-context
        ] with-variable
