File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ type TLSConfig struct {
32
32
var (
33
33
// Regexp syntax: https://github.com/google/re2/wiki/Syntax
34
34
reDSN = regexp .MustCompile (`(.+@)?([^@|^?]+)\\?(.*)` )
35
- reUserPasswd = regexp .MustCompile (`([^:@]+)(:[^:@ ]+)?@` )
35
+ reUserPasswd = regexp .MustCompile (`([^:@]+)(:[^:]+)?@` )
36
36
)
37
37
38
38
const (
Original file line number Diff line number Diff line change @@ -45,15 +45,15 @@ func TestParseDSNWithSessionConf(t *testing.T) {
45
45
sc ["mapreduce_job_quenename" ] = "mr"
46
46
cfg := & Config {
47
47
User : "usr" ,
48
- Passwd : "pswd " ,
48
+ Passwd : "ps@wd " ,
49
49
Addr : "hiveserver" ,
50
50
DBName : "mydb" ,
51
51
Auth : "PLAIN" ,
52
52
Batch : 200 ,
53
53
SessionCfg : sc ,
54
54
}
55
55
dsn := cfg .FormatDSN ()
56
- assert .Equal (t , dsn , "usr:pswd @hiveserver/mydb?batch=200&auth=PLAIN&session.mapreduce_job_quenename=mr" )
56
+ assert .Equal (t , dsn , "usr:ps@wd @hiveserver/mydb?batch=200&auth=PLAIN&session.mapreduce_job_quenename=mr" )
57
57
58
58
cfg2 , e := ParseDSN (dsn )
59
59
assert .Nil (t , e )
You can’t perform that action at this time.
0 commit comments