@@ -15,21 +15,21 @@ let triangle_query ~n ~str =
15
15
in
16
16
match % bind
17
17
let server_conn = Ivar. create () in
18
- Monitor. try_with (fun () ->
19
- test1
20
- ~trace: true
21
- ~make_transport: make_transport_default_size
22
- ~imp: [ pipe_triangle_imp ]
23
- ~state: ()
24
- ~f: (fun sconn conn ->
25
- Ivar. fill_exn server_conn sconn;
26
- Rpc.Pipe_rpc. dispatch_exn pipe_triangle_rpc conn (n, str))
27
- () )
18
+ test1
19
+ ~trace: true
20
+ ~make_transport: make_transport_default_size
21
+ ~imp: [ pipe_triangle_imp ]
22
+ ~state: ()
23
+ ~f: (fun sconn conn ->
24
+ Ivar. fill_exn server_conn sconn;
25
+ Rpc.Pipe_rpc. dispatch pipe_triangle_rpc conn (n, str))
26
+ ()
28
27
with
29
- | Error exn ->
30
- print_s ([% sexp_of: Exn . t] exn );
28
+ | Error error ->
29
+ print_s ([% sexp_of: Error . t] error );
31
30
return ()
32
- | Ok (pipe , (_ : Rpc.Pipe_rpc.Metadata.t )) ->
31
+ | Ok (Error () ) -> failwith " RPC implementation failed"
32
+ | Ok (Ok (pipe , (_ : Rpc.Pipe_rpc.Metadata.t ))) ->
33
33
let count = ref 0 in
34
34
(match % map
35
35
Clock_ns. with_timeout
@@ -52,15 +52,17 @@ let%expect_test "Query too large" =
52
52
[% expect
53
53
{|
54
54
B 1 (pipe_tri) 72 B (Failed_to_send Query Too_large )
55
- (monitor.ml.Error
56
- (" Message cannot be sent"
57
- ((reason (Message_too_big ((size 72 ) (max_message_size 40 ))))
58
- (connection
59
- ((description < created- directly> )
60
- (writer
61
- ((t ((file_descr _) (info (writer " rpc_test 1" )) (kind Fifo )))
62
- (max_message_size 40 ) (total_bytes 8 )))))))
63
- (" <backtrace elided in test>" " Caught by monitor Monitor.protect" )) | }]
55
+ ((rpc_error
56
+ (Uncaught_exn
57
+ (" Message cannot be sent"
58
+ ((reason (Message_too_big ((size 72 ) (max_message_size 40 ))))
59
+ (connection
60
+ ((description < created- directly> )
61
+ (writer
62
+ ((t ((file_descr _) (info (writer " rpc_test 1" )) (kind Fifo )))
63
+ (max_message_size 40 ) (total_bytes 8 )))))))))
64
+ (connection_description < created- directly> ) (rpc_name pipe_tri)
65
+ (rpc_version 0 )) | }]
64
66
;;
65
67
66
68
let % expect_test " responses small enough" =
0 commit comments