File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,38 @@ describe('examples', () => {
107107 } ;
108108 } ) ;
109109
110+ it ( 'config connection pool example' , done => {
111+ // tag::config-connection-pool[]
112+ const driver = neo4j . driver ( uri , neo4j . auth . basic ( user , password ) ,
113+ {
114+ maxConnectionLifetime : 30 * 60 * 60 ,
115+ maxConnectionPoolSize : 50 ,
116+ connectionAcquisitionTimeout : 2 * 60
117+ }
118+ ) ;
119+ // end::config-connection-pool[]
120+
121+ driver . onCompleted = ( ) => {
122+ driver . close ( ) ;
123+ done ( ) ;
124+ } ;
125+ } ) ;
126+
127+ it ( 'config load balancing example' , done => {
128+ // tag::config-load-balancing-strategy[]
129+ const driver = neo4j . driver ( uri , neo4j . auth . basic ( user , password ) ,
130+ {
131+ loadBalancingStrategy : "least_connected"
132+ }
133+ ) ;
134+ // end::config-load-balancing-strategy[]
135+
136+ driver . onCompleted = ( ) => {
137+ driver . close ( ) ;
138+ done ( ) ;
139+ } ;
140+ } ) ;
141+
110142 it ( 'config max retry time example' , done => {
111143 // tag::config-max-retry-time[]
112144 const maxRetryTimeMs = 15 * 1000 ; // 15 seconds
You can’t perform that action at this time.
0 commit comments