File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
packages/neo4j-driver/test Expand file tree Collapse file tree 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'
@@ -136,19 +137,9 @@ function isRemoteCluster () {
136
137
return fromEnvOrDefault ( 'STRESS_TEST_DATABASE_URI' ) !== undefined
137
138
}
138
139
139
- function isSslSchemeNotSet ( uri ) {
140
- function extractScheme ( scheme ) {
141
- if ( scheme ) {
142
- scheme = scheme . trim ( )
143
- if ( scheme . charAt ( scheme . length - 1 ) === ':' ) {
144
- scheme = scheme . substring ( 0 , scheme . length - 1 )
145
- }
146
- return scheme
147
- }
148
- return null
149
- }
150
- const scheme = extractScheme ( uri )
151
- return scheme === null || scheme === 'bolt' || scheme === 'neo4j'
140
+ function isSslSchemeNotSet ( url ) {
141
+ const parsedUri = internal . urlUtil . parseDatabaseUrl ( url )
142
+ return parsedUri . scheme === null || parsedUri . scheme === 'bolt' || parsedUri . scheme === 'neo4j'
152
143
}
153
144
154
145
function isCluster ( ) {
You can’t perform that action at this time.
0 commit comments