Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Solender committed Oct 28, 2020
1 parent b0a92c9 commit 47bbcfe
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,22 @@ func setupInit(isTest bool, conf *Config, mapTypes ...interface{}) error {
log.WithError(err).Error("failed to validate edges")
return err
}
if conf.MaxRetries < 0 {
conf.MaxRetries = 0
}

if conf.RetryWaitDuration == 0 {
// default is 1 second
conf.RetryWaitDuration = time.Second
if isTest && conf != nil {
if conf.MaxRetries < 0 {
conf.MaxRetries = 0
}

if conf.RetryWaitDuration == 0 {
// default is 1 second
conf.RetryWaitDuration = time.Second
}

internalConfig = conf
} else {
internalConfig = &Config{RetryWaitDuration: time.Second, MaxRetries: 0}
}

internalConfig = conf
if !isTest {
log.Debug("opening connection to neo4j")
// todo tls support
Expand Down

0 comments on commit 47bbcfe

Please sign in to comment.