File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
test/benchmarks/driverBench Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -387,10 +387,18 @@ export async function makeSocket(options: MakeConnectionOptions): Promise<Stream
387387 resolve ( socket ) ;
388388 } else {
389389 const connectEvent = useTLS ? 'secureConnect' : 'connect' ;
390+ const start = performance . now ( ) ;
390391 socket
391392 . once ( connectEvent , ( ) => resolve ( socket ) )
392393 . once ( 'error' , error => reject ( connectionFailureError ( 'error' , error ) ) )
393- . once ( 'timeout' , ( ) => reject ( connectionFailureError ( 'timeout' ) ) )
394+ . once ( 'timeout' , ( ) => {
395+ const end = performance . now ( ) ;
396+ return reject (
397+ new MongoNetworkTimeoutError (
398+ `socket.connect() timed out! connectTimeoutMS=${ connectTimeoutMS } ms, socket.setTimeout fired after ${ end - start } ms.`
399+ )
400+ ) ;
401+ } )
394402 . once ( 'close' , ( ) => reject ( connectionFailureError ( 'close' ) ) ) ;
395403
396404 if ( options . cancellationToken != null ) {
Original file line number Diff line number Diff line change @@ -59,10 +59,6 @@ benchmarkRunner
5959 ] ) ;
6060 const multiBench = average ( Object . values ( microBench . multiBench ) ) ;
6161
62- // ldjsonMultiFileUpload and ldjsonMultiFileExport cause connection errors.
63- // While we investigate, we will use the last known good values:
64- // https://spruce.mongodb.com/task/mongo_node_driver_next_performance_tests_run_spec_benchmark_tests_node_server_4bc3e500b6f0e8ab01f052c4a1bfb782d6a29b4e_f168e1328f821bbda265e024cc91ae54_24_11_18_15_37_24/logs?execution=0
65-
6662 const parallelBench = average ( [
6763 microBench . parallel . ldjsonMultiFileUpload ,
6864 microBench . parallel . ldjsonMultiFileExport ,
You can’t perform that action at this time.
0 commit comments