File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ type TLSConfig struct {
3232var (
3333 // Regexp syntax: https://github.com/google/re2/wiki/Syntax
3434 reDSN = regexp .MustCompile (`(.+@)?([^@|^?]+)\\?(.*)` )
35- reUserPasswd = regexp .MustCompile (`([^:@]+)(:[^:@ ]+)?@` )
35+ reUserPasswd = regexp .MustCompile (`([^:@]+)(:[^:]+)?@` )
3636)
3737
3838const (
Original file line number Diff line number Diff line change @@ -45,15 +45,15 @@ func TestParseDSNWithSessionConf(t *testing.T) {
4545 sc ["mapreduce_job_quenename" ] = "mr"
4646 cfg := & Config {
4747 User : "usr" ,
48- Passwd : "pswd " ,
48+ Passwd : "ps@wd " ,
4949 Addr : "hiveserver" ,
5050 DBName : "mydb" ,
5151 Auth : "PLAIN" ,
5252 Batch : 200 ,
5353 SessionCfg : sc ,
5454 }
5555 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" )
5757
5858 cfg2 , e := ParseDSN (dsn )
5959 assert .Nil (t , e )
You can’t perform that action at this time.
0 commit comments