@@ -25,20 +25,6 @@ export interface BuildE2eClientOptions {
2525 */
2626 writerDefaultBufferKb ?: [ min : number , max : number ] ;
2727
28- /**
29- * Minimum and maximum request latencies in milliseconds. An actual latency
30- * number will be picked randomly between these two values. Defaults to
31- * `[1, 1]`.
32- */
33- requestLatency ?: [ min : number , max : number ] ;
34-
35- /**
36- * Minimum and maximum response latencies in milliseconds. An actual latency
37- * number will be picked randomly between these two values. Defaults to
38- * `[1, 1]`.
39- */
40- responseLatency ?: [ min : number , max : number ] ;
41-
4228 /**
4329 * Number of messages to keep in buffer before sending them to the client.
4430 * The actual number of messages will be picked randomly between these two
@@ -95,23 +81,21 @@ export const buildE2eClient = <Caller extends TypeRouterCaller<any>>(caller: Cal
9581 caller,
9682 send : ( messages : ReactiveRpcMessage [ ] ) => {
9783 const encoded = ctx . msgCodec . encode ( ctx . resCodec , messages ) ;
98- const latency = opt . responseLatency ?? [ 1 , 1 ] ;
9984 setTimeout ( ( ) => {
10085 const decoded = ctx . msgCodec . decodeBatch ( ctx . resCodec , encoded ) ;
10186 client . onMessages ( decoded as ReactiveRpcServerMessage [ ] ) ;
102- } , Fuzzer . randomInt ( latency [ 0 ] , latency [ 1 ] ) ) ;
87+ } , 1 ) ;
10388 } ,
10489 bufferSize : Fuzzer . randomInt2 ( opt . serverBufferSize ?? [ 1 , 1 ] ) ,
10590 bufferTime : Fuzzer . randomInt2 ( opt . serverBufferTime ?? [ 0 , 0 ] ) ,
10691 } ) ;
10792 client = new StreamingRpcClient ( {
10893 send : ( messages : ReactiveRpcClientMessage [ ] ) => {
10994 const encoded = ctx . msgCodec . encode ( ctx . reqCodec , messages ) ;
110- const latency = opt . requestLatency ?? [ 1 , 1 ] ;
11195 setTimeout ( ( ) => {
11296 const decoded = ctx . msgCodec . decodeBatch ( ctx . reqCodec , encoded ) ;
11397 streamProcessor . onMessages ( decoded as ReactiveRpcClientMessage [ ] , { } ) ;
114- } , Fuzzer . randomInt ( latency [ 0 ] , latency [ 1 ] ) ) ;
98+ } , 1 ) ;
11599 } ,
116100 bufferSize : Fuzzer . randomInt2 ( opt . clientBufferSize ?? [ 1 , 1 ] ) ,
117101 bufferTime : Fuzzer . randomInt2 ( opt . clientBufferTime ?? [ 0 , 0 ] ) ,
0 commit comments