File tree 1 file changed +4
-13
lines changed
packages/neo4j-driver/test
1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 17
17
* limitations under the License.
18
18
*/
19
19
20
+ import { internal } from 'neo4j-driver-core'
20
21
import neo4j from '../src'
21
22
import { READ , WRITE } from '../src/driver'
22
23
import parallelLimit from 'async/parallelLimit'
@@ -137,19 +138,9 @@ function isRemoteCluster () {
137
138
return fromEnvOrDefault ( 'STRESS_TEST_DATABASE_URI' ) !== undefined
138
139
}
139
140
140
- function isSslSchemeNotSet ( uri ) {
141
- function extractScheme ( scheme ) {
142
- if ( scheme ) {
143
- scheme = scheme . trim ( )
144
- if ( scheme . charAt ( scheme . length - 1 ) === ':' ) {
145
- scheme = scheme . substring ( 0 , scheme . length - 1 )
146
- }
147
- return scheme
148
- }
149
- return null
150
- }
151
- const scheme = extractScheme ( uri )
152
- return scheme === null || scheme === 'bolt' || scheme === 'neo4j'
141
+ function isSslSchemeNotSet ( url ) {
142
+ const parsedUri = internal . urlUtil . parseDatabaseUrl ( url )
143
+ return parsedUri . scheme === null || parsedUri . scheme === 'bolt' || parsedUri . scheme === 'neo4j'
153
144
}
154
145
155
146
function isCluster ( ) {
You can’t perform that action at this time.
0 commit comments